6 Replies Latest reply on Sep 16, 2005 12:26 PM by Norman Richards

    JB's Developer Notebook - Omission and Error

    Arnie Morein Novice

      I am going through this book, which is GREAT by the way, but I have found one missing line of code and have now come up against something that is beyond me.

      I am in chapter 4: Connecting to a Real Database. I have created the jbossdb as root and assigned the todoapp user to the database w/full rights.

      I've done the ant with the -Doptional.ddl switch and deployed the WAR (which was working up to that point with Hypersonic. I can delve into the WAR and see the jbosscmp-jdbc.xml file. But when the war is deployed (before its first use):

      2005-09-13 14:39:57,937 DEBUG [org.jboss.mq.pm.jdbc2.PersistenceManager] Starting jboss.mq:service=PersistenceManager
      2005-09-13 14:39:57,937 DEBUG [org.jboss.mq.pm.jdbc2.PersistenceManager] Resolving uncommited TXS
      2005-09-13 14:39:57,937 DEBUG [org.jboss.mq.pm.jdbc2.PersistenceManager] Could not create table with SQL: CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
      java.sql.SQLException: Table already exists: JMS_MESSAGES in statement [CREATE CACHED TABLE JMS_MESSAGES]

      and

      2005-09-13 14:39:57,953 DEBUG [org.jboss.mq.pm.jdbc2.PersistenceManager] Could not create table with SQL: CREATE CACHED TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) )
      java.sql.SQLException: Table already exists: JMS_TRANSACTIONS in statement [CREATE CACHED TABLE JMS_TRANSACTIONS]

      Which I know to be wrong since the database has no tables and still doesn't. I've created -ds.xml files for our production servers and other code is connecting so I know that's not it. The JMX shows the DS up and running and usable.

      Page 56 says to edit the jbosscmp-jdbc.xml file but there are 7 of these in the todo folder hierarchy and no mention is made to which needs to be edited and/or copied to another directory (/default?)

      What is causing this?