1 Reply Latest reply on Aug 10, 2006 2:46 PM by Ovidiu Feodorov

    CreateTablesOnStartup being ignored?

    Darryl Beck Newbie

      I have installed JBoss Messaging RC4. I have replaces the hsqldb persistence file with the supplier Oracle one. After my first run, I see the JMS tables created in my Oracle instance.

      Now, I set that value to false in oracle-persistence-service.xml and restart the server. I have the console log level set to DEBUG. I see the follwoing in server.log:

      2006-08-10 11:35:42,578 DEBUG [org.jboss.system.ServiceConfigurator] CreateTablesOnStartup set to false in jboss.messaging:service=PersistenceManager

      but further down, I see:

      2006-08-10 11:36:01,718 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1cc0a7f, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1087d61{ url=null ,addedOrder=0}
      2006-08-10 11:36:01,734 DEBUG [org.jboss.jms.server.plugin.JDBCChannelMapper] Failed to create users table: CREATE TABLE JMS_USER (USERID VARCHAR2(32) NOT NULL, PASSWD VARCHAR2(32) NOT NULL, CLIENTID VARCHAR2(128), PRIMARY KEY(USERID))
      java.sql.SQLException: ORA-00955: name is already used by an existing object

      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
      at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
      at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
      ....



      I know that these are Debug messages that can be ignored, but any ideas as to why this could be happening?

      Thanks


        • 1. Re: CreateTablesOnStartup being ignored?
          Ovidiu Feodorov Master

          Good catch.

          There are actually two persistence-related services (you can see them in oracle-persistence-service.xml): JDBCPersistenceManager and JDBCChannelMapper. Each of them creates its own tables, so in order to prevent any tables to be created at startup, you need to set

          <attribute name="CreateTablesOnStartup">true</attribute>


          on both of them.

          Well, at least in theory. I discovered a bug that prevented "CreateTablesOnStartup" attribute value to propagate to JDBCChannelMapper, so the service would attempt to always create tables, regardless of configuration. I fixed it (http://jira.jboss.org/jira/browse/JBMESSAGING-507) and the fix will be available in CR5.

          Thank you for your report.