JBoss JMS Doesn’t Create Tables with XA Datasource

Home/Java/JBoss/JBoss JMS Doesn’t Create Tables with XA Datasource

The JBoss Messaging service (at least on JBoss 4.3 EAP) defaults to using a local Hypersonic database. For production use you’ll want to switch away from Hypersonic to a real database, such as Oracle (in this example).

If you’re using XA datasources in general, it’s tempting to go ahead and create the new DefaultDS datasource definition as an XA datasource (like the example one jboss-eap-4.3/docs/examples/jca/oracle-xa-ds.xml ). However, I’ve just discovered that if you do that the JMS startup service won’t successfully create the tables it needs. The HILOSEQUENCES and TIMERS tables get created by the UUID key generator service, but the JMS table creation silently fails and then you get errors like this:

11:16:32,161 ERROR [ExceptionUtil] ServerPeer[0] startService
java.sql.SQLException: ORA-00942: table or view does not exist

Switch the DefaultDS definition to a non-XA version, and it will create all of the JBM_* tables successfully.

By | 2017-05-18T15:15:55+00:00 July 1st, 2010|JBoss|4 Comments

About the Author:

4 Comments

  1. Ferenc July 5, 2010 at 11:41 am - Reply

    WOW!
    Thanks man!!

  2. Case April 7, 2011 at 3:33 am - Reply

    Thank you so much for this information, you saved my day!

  3. Lan March 27, 2014 at 12:11 pm - Reply

    After the tables are created, do you switch it back to xa-datasource? is DefaultDS involved in transaction, or deal more with inner workings of jboss?

    • Devon March 27, 2014 at 1:36 pm - Reply

      Yes you can switch it back after. Or leave it:)

Leave A Comment