2 Replies Latest reply on Sep 14, 2010 11:38 PM by 807581

    Persistent Store Problems for MYSQL Enhanced Cluster With OpenMQ 4.4

      I am trying to implement an enhanced cluster with failover. I have edited the config files for each broker instance for a persistent store. I have appended the following to each of the config.properties files:

      imq.brokerid=myclusterinstanceINSTANCE1 # I substitute INSTANCE2 for INSTANCE1 for broker #2

      I then create the persistence storage with "imqdbmgr create tbl". When I view the data in the tables it creates, I have one row. Under Store_Version, I have 410. Under LOCK_ID, it has NULL. When I go to start the brokers with imqbrokerd, I get the following error:

      ERROR [B3198]: Error initializing cluster manager:
      com.sun.messaging.jmq.jmsserver.util.BrokerException: [B4239]: Failed to load persistent store version from database table MQVER41Cmycluster
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.VersionDAOImpl.getStoreVersion(VersionDAOImpl.java:310)
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBTool.updateStoreVersion410IfNecessary(DBTool.java:350)
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.checkStore(JDBCStore.java:3599)
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.<init>(JDBCStore.java:127)
      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:967)
      at com.sun.messaging.jmq.jmsserver.cluster.ha.HAClusterManagerImpl.initialize(HAClusterManagerImpl.java:181)
      at com.sun.messaging.jmq.jmsserver.Globals.initClusterManager(Globals.java:903)
      at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:777)
      at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:410)
      at com.sun.messaging.jmq.jmsserver.Broker.main(Broker.java:1971)
      Caused by: java.lang.NullPointerException
      at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1103)
      at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2777)
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.VersionDAOImpl.getStoreVersion(VersionDAOImpl.java:298)
      ... 16 more

      I believe this error is attributed to the NULL value under LOCK_ID. I think that the value under LOCK_ID should be the name of the broker from the config file (even though I specified them in the config files). Any ideas?? THANKS!
        • 1. Re: Persistent Store Problems for MYSQL Enhanced Cluster With OpenMQ 4.4
          This might be related MySQL bug

          Please try a newer version of MySQL Connector/J
          • 2. Re: Persistent Store Problems for MYSQL Enhanced Cluster With OpenMQ 4.4
            Just some pointers -- maybe this will be of use:
            If you haven't already read it, please take a look at the [ MySQL setup guide|https://mq.dev.java.net/OpenMQ_MySQLCluster_Setup_Guide.html] .

            We recommend using NDB Data-store of MySQL Cluster, though this isn't an absolute requirement. Due to some issues we have found with earlier versions, we recommend using MySQL Cluster, 7.0.9 or better (the current version is 7.0.16, or 7.1.5). Either of these would contain Connector/J.

            I'd also recommend using the latest version -- MQ 4.4update2 (just in case you happen to have an older copy). There were many minor improvements in the integration with MySQL from the original 4.4 release, to update 2. This is linked at the MQ download page: [https://mq.dev.java.net/downloads.html]