0 Replies Latest reply on Mar 21, 2002 6:36 AM by seanorionreed

    Persisting JMS messages to oracle

    seanorionreed

      Hi,

      I am using JBoss3.0.0alpha and I would like to persist my JMS messages to an Oracle8i database.
      The problem I am getting relates to the tables : JMS_MESSAGES and JMS_TRANSACTION.
      I know that for Oracle you must set up these tables yourself, and I have done so.

      CREATE TABLE JMS_MESSAGES
      (
      MESSAGEID CHAR(32) NOT NULL,
      DESTINATION VARCHAR(32) NOT NULL,
      MESSAGEBLOB BLOB,
      PRIMARY KEY (MESSAGEID, DESTINATION)
      );
      CREATE INDEX JMS_MESSAGES_DEST ON JMS_MESSAGE(DESTINATION);
      CREATE TABLE JMS_TRANSACTION
      (
      ID CHAR(32)
      );

      However JBoss doesnt seem to detect these tables and so tries to create them itself.
      And when it does try to create them itself, oracle throws a 'name is already used by
      an existing object' error. Why is JBoss not detecting my tables for JMS ?

      Any help would be greatly appreciated.

      Sean

      ------
      Errors
      ------

      ...
      [11:27:39,156,OracleDS] Started
      [11:27:39,156,PersistenceManager] Starting
      [11:27:39,847,PersistenceManager] Stopped
      org.jboss.mq.SpyJMSException: could not find or set up transaction table
      at org.jboss.mq.pm.jdbc.TxLog.throwJMSException(TxLog.java:240)
      at org.jboss.mq.pm.jdbc.TxLog.(TxLog.java:78)
      at org.jboss.mq.pm.jdbc.PersistenceManager.startService(PersistenceManager.java:141)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:117)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:775)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:479)
      at org.jboss.system.ServiceController.start(ServiceController.java:507)
      at org.jboss.system.ServiceController.start(ServiceController.java:507)
      at org.jboss.system.ServiceController.registerAndStartService(ServiceController.java:273)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.resource.RARDeployer.deploy(RARDeployer.java:203)
      at org.jboss.deployment.DeployerMBeanSupport.deploy(DeployerMBeanSupport.java:107)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:654)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:327)
      at java.lang.Thread.run(Unknown Source)
      linked exception is:
      java.sql.SQLException: ORA-00955: name is already used by an existing object
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
      at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
      at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
      at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
      at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
      at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
      at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
      at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:693)
      at org.jboss.resource.adapter.jdbc.local.StatementInPool.executeUpdate(StatementInPool.java:730)
      at org.jboss.mq.pm.jdbc.TxLog.(TxLog.java:61)
      at org.jboss.mq.pm.jdbc.PersistenceManager.startService(PersistenceManager.java:141)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:117)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:775)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:479)
      at org.jboss.system.ServiceController.start(ServiceController.java:507)
      at org.jboss.system.ServiceController.start(ServiceController.java:507)
      at org.jboss.system.ServiceController.registerAndStartService(ServiceController.java:273)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.resource.RARDeployer.deploy(RARDeployer.java:203)
      at org.jboss.deployment.DeployerMBeanSupport.deploy(DeployerMBeanSupport.java:107)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:654)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:327)
      at java.lang.Thread.run(Unknown Source)

      ------------------------------------
      jbossmq-service.xml (excerpt)
      ------------------------------------


      <mbean-ref name="DataSource">JBossMQ:service=ConnectionFactoryLoader,name=OracleDS</mbean-ref>
      <mbean-ref name="MessageCache">JBossMQ:service=MessageCache</mbean-ref>
      jms_transaction
      jms_messages


      --------------------
      oracle-service.xml :
      --------------------





      ConnectionURL=jdbc:oracle:thin:@192.168.1.30:1521:SEANDB
      DriverClass=oracle.jdbc.driver.OracleDriver

      OracleDS
      java:/TransactionManager
      <mbean-ref name="ResourceAdapterName">JCA:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter</mbean-ref>
      <mbean-ref name="ConnectionManagerFactoryLoaderName">JCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</mbean-ref>
      #
      #Wed Aug 15 16:17:29 EDT 2001
      BlockingTimeoutMillis=50000
      IdleTimeoutMinutes=30
      MaxSize=10
      CleanupIntervalMinutes=10
      MinSize=0
      MaxIdleTimeoutPercent=1.0


      org.jboss.resource.security.ManyToOnePrincipalMapping

      userName=restore
      password=restore