0 Replies Latest reply on Aug 4, 2005 5:08 AM by Siraj Mohamed

    Jboss-4.0.2 does not start successfully with DB2

    Siraj Mohamed Newbie

      Hi All,

      I am having problem starting jboss-4.0.2 with DB2 version 8. This is my db2-ds.xml file configuration


      <local-tx-datasource>
      <jndi-name>DefaultDS</jndi-name>
      <connection-url>jdbc:db2://cs-xmeta:50000/xmeta</connection-url>
      <driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
      <user-name>xxxx</user-name>
      yyyy
      <min-pool-size>5</min-pool-size>


      <type-mapping>DB2</type-mapping>

      </local-tx-datasource>



      And also this is my db2-jdbc2-service.xml




      <depends optional-attribute-name="MessageCache">jboss.mq:service=MessageCache
      <depends optional-attribute-name="PersistenceManager">jboss.mq:service=PersistenceManager
      <depends optional-attribute-name="StateManager">jboss.mq:service=StateManager



      50
      60
      jboss.mq:service=PersistenceManager




      <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS

      BLOB_TYPE=BINARYSTREAM_BLOB
      INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
      INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
      SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
      SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES
      SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
      SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
      MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
      UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=?
      UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=?
      UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
      DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXID IN (SELECT TXID FROM JMS_TRANSACTIONS) AND TXOP=?
      DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
      DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
      DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
      CREATE_MESSAGE_TABLE = CREATE TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, \
      DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), \
      MESSAGEBLOB LONG VARCHAR , PRIMARY KEY (MESSAGEID, DESTINATION) )
      CREATE_TX_TABLE = CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER )
      CREATE_TABLES_ON_STARTUP = TRUE





      But it throws following exception

      2005-08-04 14:58:30,992 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=hiran, password=--hidden--}
      2005-08-04 14:58:35,461 DEBUG [org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory] Executing DDL: create table HILOSEQUENCES (
      SEQUENCENAME varchar(50) not null,
      HIGHVALUES integer not null,
      constraint hilo_pk primary key (SEQUENCENAME)
      )
      2005-08-04 14:58:35,461 ERROR [org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory] Starting failed jboss:service=KeyGeneratorFactory,type=HiLo
      com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -7, SQLSTATE: 42601, SQLERRMC:
      ;able HILOSEQUENCES (
      at com.ibm.db2.jcc.c.zc.e(zc.java:1606)
      at com.ibm.db2.jcc.c.zc.b(zc.java:1174)
      at com.ibm.db2.jcc.a.eb.i(eb.java:234)
      at com.ibm.db2.jcc.a.eb.b(eb.java:50)
      at com.ibm.db2.jcc.a.r.b(r.java:36)
      at com.ibm.db2.jcc.a.tb.f(tb.java:141)
      at com.ibm.db2.jcc.c.zc.m(zc.java:1171)
      at com.ibm.db2.jcc.c.zc.a(zc.java:1890)
      at com.ibm.db2.jcc.c.zc.c(zc.java:540)
      at com.ibm.db2.jcc.c.zc.executeUpdate(zc.java:525)

      2005-08-04 14:58:35,508 WARN [org.jboss.system.ServiceController] Problem starting service jboss:service=KeyGeneratorFactory,type=HiLo
      com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -7, SQLSTATE: 42601, SQLERRMC:
      ;able HILOSEQUENCES (
      at com.ibm.db2.jcc.c.zc.e(zc.java:1606)
      at com.ibm.db2.jcc.c.zc.b(zc.java:1174)
      at com.ibm.db2.jcc.a.eb.i(eb.java:234)
      at com.ibm.db2.jcc.a.eb.b(eb.java:50)
      at com.ibm.db2.jcc.a.r.b(r.java:36)
      at com.ibm.db2.jcc.a.tb.f(tb.java:141)
      at com.ibm.db2.jcc.c.zc.m(zc.java:1171)
      at com.ibm.db2.jcc.c.zc.a(zc.java:1890)
      at com.ibm.db2.jcc.c.zc.c(zc.java:540)
      at com.ibm.db2.jcc.c.zc.executeUpdate(zc.java:525)
      at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:229)
      at org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory.createTableIfNotExists(HiLoKeyGeneratorFactory.java:291)
      at org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory.initSequence(HiLoKeyGeneratorFactory.java:231)
      at org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory.startService(HiLoKeyGeneratorFactory.java:212)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
      at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java(Inlined Compiled Code))
      at org.jboss.mx.server.Invocation.invoke(Invocation.java(Compiled Code))
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
      at $Proxy0.start(Unknown Source)

      2005-08-04 14:58:35,804 DEBUG [org.jboss.mq.pm.jdbc2.PersistenceManager] Could not create table with SQL: CREATE TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB LONG VARCHAR , PRIMARY KEY (MESSAGEID, DESTINATION) )
      com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -601, SQLSTATE: 42710, SQLERRMC: HIRAN.JMS_MESSAGES;TABLE
      at com.ibm.db2.jcc.c.zc.d(zc.java:1351)
      at com.ibm.db2.jcc.a.eb.l(eb.java:366)
      at com.ibm.db2.jcc.a.eb.a(eb.java:64)
      at com.ibm.db2.jcc.a.r.a(r.java:48)
      at com.ibm.db2.jcc.a.ub.c(ub.java:266)
      at com.ibm.db2.jcc.c.ad.Z(ad.java:1666)
      at com.ibm.db2.jcc.c.ad.d(ad.java:2224)
      at com.ibm.db2.jcc.c.ad.V(ad.java:521)
      at com.ibm.db2.jcc.c.ad.executeUpdate(ad.java:504)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:316)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(PersistenceManager.java:224)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1420)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
      at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java(Inlined Compiled Code))
      at org.jboss.mx.server.Invocation.invoke(Invocation.java(Compiled Code))
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:418)
      at org.jboss.system.ServiceController.start(ServiceController.java:440)
      at org.jboss.system.ServiceController.start(ServiceController.java:440)
      at org.jboss.system.ServiceController.start(ServiceController.java:440)
      at org.jboss.system.ServiceController.start(ServiceController.java:440)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
      at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java(Inlined Compiled Code))
      at org.jboss.mx.server.Invocation.invoke(Invocation.java(Compiled Code))
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java(Compiled Code))
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
      at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java(Compiled Code))
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java(Compiled Code))
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
      at $Proxy35.start(Unknown Source)


      I did a workaround like removing uuid-key-generator.sar file from the deploy folder then I do not see any errors. But I am too not sure it is a good approach. Appriciate any help to resolve this issue.

      Thanks & Regards
      Siraj