3 Replies Latest reply: Jun 9, 2011 11:36 PM by ak RSS

    JMS on Glassfish DB problem after restarting

    647770
      Hi,
      I use JMS (Open Message Queue 4.4) included in Glassfish (version 3.0.1 build 22). I configured the db connection in JMS. At the beginning it works, but when glassfish is stopped and then restarte JMS give me this error with the DB connection:

      >

      [06/Jun/2011:09:58:28 CEST] [B1170]: Auto Creation of plugged-in persistent store is enabled
      [06/Jun/2011:09:58:29 CEST] WARNING [B2221]: Table(s) MQCON41SDPCTClOMQ [12,11, SDPCTClOMQ] not found in database
      [06/Jun/2011:09:58:29 CEST] ERROR [B3213]: Persistent store might be corrupted: one or more database tables are missing
      [06/Jun/2011:09:58:29 CEST] ERROR [B3000]: Could not open persistent message store:
      com.sun.messaging.jmq.jmsserver.util.BrokerException: [B3213]: Persistent store might be corrupted: one or more database tables are missing
           at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.checkStore(JDBCStore.java:3774)
           at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.<init>(JDBCStore.java:137)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at com.sun.messaging.jmq.jmsserver.persist.StoreManager.getStore(StoreManager.java:157)
           at com.sun.messaging.jmq.jmsserver.Globals.getStore(Globals.java:952)
           at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:839)
           at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:412)
           at com.sun.messaging.jmq.jmsserver.Broker.main(Broker.java:1973)




      The table mentioned is present in the db. To start JMS correctly I have to drop all the tables in the db (the JMS recreate them).
      Why this behaviour?
      What is the problem?
      Thanks, bye bye.
        • 1. Re: JMS on Glassfish DB problem after restarting
          ak
          What is the database server and its max. allowed table name length ? Unless the table name was silently truncated by the database server all MQ table names existed in the database for the broker should be returned by the database server when queried at broker startup. There was a MQ bug 6893888 in 4.4, fixed in 4.4u1, in max. table name length check that affected only when a MQ table name is about the max. allowed table name length, e.g. when relatively long imq.brokerid value set, by database server, and if you are using older Oracle 11g + ojdbc6.jar or ojdbc5.jar release, there was a known issue 6916725 with retrieving table names from database, which appear to be fixed in Oracle 11g release 2 drivers

          Tried with Oracle database server
          Oracle Database 10g Release 10.2.0.1.0 - 64bit Production, 10.2.0.3.0
          for both OpenMQ 4.4 (Build 16-a) and 4.4u2p2 and setting imq.brokerid=DPCTClOMQ and was unable to reproduce the problem. If the above information does not help, please provide the complete broker logs, exact broker version, and broker configuration properties, and database vendor and server/driver versions and steps to reproduce it

          You might want to be aware of GlassFish MQ forum at
          Java System Message Queue
          • 2. Re: JMS on Glassfish DB problem after restarting
            647770
            Hi,
            I continue to have the problem.
            Here my log:

            >

            ================================================================================
            Open Message Queue 4.4
            Oracle
            Version: 4.4 Update 2 (Build 5-a)
            Compile: Fri May 14 23:24:45 PDT 2010

            Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
            ================================================================================
            Java Runtime: 1.6.0_16 Sun Microsystems Inc. /usr/java/jdk1.6.0_16/jre
            [09/Jun/2011:16:21:26 CEST] IMQ_HOME=/opt/glassfish/mq
            [09/Jun/2011:16:21:26 CEST] IMQ_VARHOME=/opt/glassfish/glassfish/domains/domain1/imq
            [09/Jun/2011:16:21:26 CEST] Linux 2.6.18-194.el5 i386 server05 (32 cpu) root
            [09/Jun/2011:16:21:26 CEST] Java Heap Size: max=193920k, current=193920k
            [09/Jun/2011:16:21:26 CEST] Arguments: -javahome /usr/java/jdk1.6.0_16/jre -Dimq.cluster.nowaitForMasterBroker=true -varhome /opt/glassfish/glassfish/domains/domain1/imq -startRmiRegistry -rmiRegistryPort 7776 -Dimq.imqcmd.user=admin -save -name imqbroker -port 7676 -silent -read-stdin
            [09/Jun/2011:16:21:26 CEST] [B1203]: Starting with a brokerid of DPCTOMQ
            [09/Jun/2011:16:21:26 CEST] [B1004]: Starting the portmapper service using tcp [ 7676, 50, * ] with min threads 1 and max threads of 1
            [09/Jun/2011:16:21:26 CEST] [B1060]: Loading persistent data...
            [09/Jun/2011:16:21:26 CEST] imq.persist.jdbc.oracle.driver=oracle.jdbc.pool.OracleConnectionPoolDataSource
            [09/Jun/2011:16:21:27 CEST] imq.persist.jdbc.oracle.property.implicitCachingEnabled=true
            [09/Jun/2011:16:21:27 CEST] imq.persist.jdbc.oracle.property.maxStatements=25
            [09/Jun/2011:16:21:27 CEST] imq.persist.jdbc.connection.validationQuery=SELECT 1 FROM DUAL
            [09/Jun/2011:16:21:27 CEST] imq.persist.jdbc.connection.validateOnGet=false
            [09/Jun/2011:16:21:27 CEST] imq.persist.jdbc.connection.timeoutIdle=true
            [09/Jun/2011:16:21:27 CEST] imq.persist.jdbc.connection.reaptime=300
            [09/Jun/2011:16:21:27 CEST] imq.persist.jdbc.min_connections=5
            [09/Jun/2011:16:21:27 CEST] imq.persist.jdbc.max_connections=5
            [09/Jun/2011:16:21:27 CEST] Oracle, Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
            With the Partitioning, Real Application Clusters, OLAP, Data Mining
            and Real Application Testing options, 11.1.0.7.0-Production
            [09/Jun/2011:16:21:27 CEST] Using plugged-in persistent store:
                 version=410
                 brokerid=DPCTOMQ
                 database connection url=jdbc:oracle:thin:@(DESCRIPTION = (LOAD_BALANCE = on) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.10.19)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.10.18)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = DPCTClusterINFRA)))
                 database user=OMQ
            [09/Jun/2011:16:21:27 CEST] [B1170]: Auto Creation of plugged-in persistent store is enabled
            [09/Jun/2011:16:21:29 CEST] WARNING [B2221]: Table(s) MQCON41SDPCTOMQ [12,11, SDPCTOMQ] not found in database
            [09/Jun/2011:16:21:29 CEST] ERROR [B3213]: Persistent store might be corrupted: one or more database tables are missing
            [09/Jun/2011:16:21:29 CEST] ERROR [B3000]: Could not open persistent message store:
            com.sun.messaging.jmq.jmsserver.util.BrokerException: [B3213]: Persistent store might be corrupted: one or more database tables are missing
                 at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.checkStore(JDBCStore.java:3774)
                 at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.<init>(JDBCStore.java:137)
                 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                 at java.lang.Class.newInstance0(Class.java:355)
                 at java.lang.Class.newInstance(Class.java:308)
                 at com.sun.messaging.jmq.jmsserver.persist.StoreManager.getStore(StoreManager.java:157)
                 at com.sun.messaging.jmq.jmsserver.Globals.getStore(Globals.java:952)
                 at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:839)
                 at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:412)
                 at com.sun.messaging.jmq.jmsserver.Broker.main(Broker.java:1973)



            How can I solve?
            Thanks, bye bye.
            • 3. Re: JMS on Glassfish DB problem after restarting
              ak
              You are using Oracle 11g database release 11.1.0.7.0.

              Unable to reproduce the problem with Oracle 11g release 11.2.0.1.0 database server and driver (see below), so please use Oracle 11g 11.2.0.1.0

              ........
              Java Runtime: 1.6.0_14 Sun Microsystems Inc. /net/jpgserv/usr/jdk/jdk1.6.0_14/jre
              ....
              [09/Jun/2011:09:11:30 PDT] SunOS 5.10 sparc xxxx (24 cpu) xxxx
              ....
              09/Jun/2011:09:11:31 PDT] [B1203]: Starting with a brokerid of DPCTOMQ
              ....
              [09/Jun/2011:09:11:31 PDT] [B1060]: Loading persistent data...
              [09/Jun/2011:09:11:31 PDT] imq.persist.jdbc.oracle.driver=oracle.jdbc.pool.OracleConnectionPoolDataSource
              [09/Jun/2011:09:11:32 PDT] imq.persist.jdbc.oracle.property.implicitCachingEnabled=true
              [09/Jun/2011:09:11:32 PDT] imq.persist.jdbc.oracle.property.maxStatements=25
              [09/Jun/2011:09:11:32 PDT] imq.persist.jdbc.connection.validationQuery=SELECT 1 FROM DUAL
              [09/Jun/2011:09:11:32 PDT] imq.persist.jdbc.connection.validateOnGet=false
              [09/Jun/2011:09:11:32 PDT] imq.persist.jdbc.connection.timeoutIdle=true
              [09/Jun/2011:09:11:32 PDT] imq.persist.jdbc.connection.reaptime=300
              [09/Jun/2011:09:11:32 PDT] imq.persist.jdbc.min_connections=5
              [09/Jun/2011:09:11:32 PDT] imq.persist.jdbc.max_connections=5
              [09/Jun/2011:09:11:34 PDT] Oracle, Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
              With the Partitioning, OLAP, Data Mining and Real Application Testing options, 11.2.0.2.0
              [09/Jun/2011:09:11:34 PDT] Using plugged-in persistent store:
              version=410
              brokerid=DPCTOMQ
              database connection url=jdbc:oracle:thin:@xxx:1521:imq
              database user=imqtest
              [09/Jun/2011:09:11:34 PDT] [B1170]: Auto Creation of plugged-in persistent store is enabled
              ......
              [09/Jun/2011:09:11:42 PDT] [B1039]: Broker "DPCTOMQ@xxxxx:7677" ready.