users@glassfish.java.net

Glassfish JMX persistent (Informix) queue problem

From: <glassfish_at_javadesktop.org>
Date: Mon, 19 May 2008 08:43:15 PDT

Hi there,

I have set up my glassfish with JMX with persistent queueing (with an Informix 11.10 database underneath) with the following properties:

imq.persist.store=jdbc

imq.autocreate.destination.useDMQ=false

imq.persist.jdbc.informix.user=informix

imq.persist.jdbc.opendburl=jdbc:informix-sqli://gromit:9088/imjv_queue:INFORMIXSERVER=demo_on;username=informix;password=XXXXX

imq.persist.jdbc.informix.property.url=jdbc:informix-sqli://gromit:9088/imjv_queue:INFORMIXSERVER=demo_on;password=XXXXX

imq.persist.jdbc.informix.needpassword=false

imq.persist.jdbc.informix.driver=com.informix.jdbc.IfxDriver

imq.brokerid=imjv

imq.persist.jdbc.dbVendor=informix

imq.persist.jdbc.informix.table.MQCONSTATE41=CREATE TABLE MQCONSTATE41Simjv (MESSAGE_ID VARCHAR(100) NOT NULL, CONSUMER_ID INT8 NOT NULL, STATE INT, TRANSACTION_ID INT8, CREATED_TS INT8 NOT NULL, PRIMARY KEY(MESSAGE_ID, CONSUMER_ID));

imq.persist.jdbc.informix.table.MQBKR41=CREATE TABLE MQBKR41Simjv (ID VARCHAR(100) NOT NULL, URL VARCHAR(100) NOT NULL, VERSION INT NOT NULL, STATE INT NOT NULL, TAKEOVER_BROKER VARCHAR(100), HEARTBEAT_TS INT8, PRIMARY KEY(ID));

imq.persist.jdbc.informix.table.MQCON41=CREATE TABLE MQCON41Simjv (ID INT8 NOT NULL, CLIENT_ID LVARCHAR(1024), DURABLE_NAME LVARCHAR(1024), CONSUMER BLOB NOT NULL, CREATED_TS INT8 NOT NULL, PRIMARY KEY(ID));

imq.persist.jdbc.informix.table.MQTXN41=CREATE TABLE MQTXN41Simjv (ID INT8 NOT NULL, TYPE INT NOT NULL, STATE INT, AUTO_ROLLBACK INT NOT NULL, XID LVARCHAR(256), TXN_STATE BLOB NOT NULL, TXN_HOME_BROKER BLOB, TXN_BROKERS BLOB, STORE_SESSION_ID INT8 NOT NULL, EXPIRED_TS INT8 NOT NULL, ACCESSED_TS INT8 NOT NULL, PRIMARY KEY(ID));

imq.persist.jdbc.informix.table.MQDST41=CREATE TABLE MQDST41Simjv (ID VARCHAR(100) NOT NULL, DESTINATION BLOB NOT NULL, IS_LOCAL INT NOT NULL, CONNECTION_ID INT8, CONNECTED_TS INT8, STORE_SESSION_ID INT8, CREATED_TS INT8 NOT NULL, PRIMARY KEY(ID));

imq.persist.jdbc.informix.table.MQSES41=CREATE TABLE MQSES41Simjv (ID INT8 NOT NULL, BROKER_ID VARCHAR(100) NOT NULL, IS_CURRENT INT NOT NULL, CREATED_BY VARCHAR(100) NOT NULL, CREATED_TS INT8 NOT NULL, PRIMARY KEY(ID));

imq.persist.jdbc.informix.table.MQMSG41=CREATE TABLE MQMSG41Simjv (ID VARCHAR(100) NOT NULL, MESSAGE BLOB NOT NULL, MESSAGE_SIZE INT, STORE_SESSION_ID INT8 NOT NULL, DESTINATION_ID VARCHAR(100), TRANSACTION_ID INT8, CREATED_TS INT8 NOT NULL, PRIMARY KEY(ID));

imq.persist.jdbc.informix.table.MQCREC41=CREATE TABLE MQCREC41Simjv (RECORD BLOB NOT NULL, CREATED_TS INT8 NOT NULL);

imq.persist.jdbc.informix.table.MQPROP41=CREATE TABLE MQPROP41Simjv (PROPNAME VARCHAR(100) NOT NULL, PROPVALUE BLOB, PRIMARY KEY(PROPNAME));

imq.persist.jdbc.informix.table.MQVER41=CREATE TABLE MQVER41Simjv (STORE_VERSION INT NOT NULL, LOCK_ID VARCHAR(100));

When I create the tables using the imqcmd I get no errors and all the tables are created equivalent like in the case of the MySQL variant.

When I start up my domain (+broker) I get the following log:

================================================================================

Sun Java(tm) System Message Queue 4.1

Sun Microsystems, Inc.

Version: 4.1 Patch 1 (Build 4-b)

Compile: Wed Nov 7 22:30:57 PST 2007



Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. Use is

subject to license terms.

================================================================================

Java Runtime: 1.6.0_03 Sun Microsystems Inc. /usr/lib/jvm/java-6-sun-1.6.0.03/jre

[19/May/2008:15:03:48 GMT] License: Sun Java(tm) System Message Queue 4.1 Enterprise Edition

[19/May/2008:15:03:48 GMT] IMQ_HOME=/opt/glassfish/imq

[19/May/2008:15:03:48 GMT] IMQ_VARHOME=/opt/glassfish/domains/cluster1/imq

[19/May/2008:15:03:48 GMT] Linux 2.6.22-14-generic i386 cluster1 (2 cpu) root

[19/May/2008:15:03:48 GMT] Java Heap Size: max=506816k, current=38624k

[19/May/2008:15:03:48 GMT] Arguments: -port 7676 -name imqbroker -imqhome /opt/glassfish/imq/bin/.. -varhome /opt/glassfish/domains/cluster1/imq -libhome /opt/glassfish/imq/lib -useRmiRegistry -rmiRegistryPort 8686 -save -silent

[19/May/2008:15:03:48 GMT] Embedded Broker

[19/May/2008:15:03:48 GMT] [B1203]: Starting with a brokerid of imjv

[19/May/2008:15:03:48 GMT] [B1004]: Starting the portmapper service using tcp [ 7676, 50, * ] with min threads 1 and max threads of 1

[19/May/2008:15:03:48 GMT] [B1060]: Loading persistent data...

[19/May/2008:15:03:49 GMT] Using plugged-in persistent store:

        version=410

        brokerid=imjv

        database connection url=jdbc:informix-sqli://grommit:9088/imjv_queue:INFORMIXSERVER=demo_on;username=XXXXX;password=XXXXXX

        database user=informix

[19/May/2008:15:03:49 GMT] [B1170]: Auto Creation of plugged-in persistent store is enabled

[19/May/2008:15:03:49 GMT] [B1041]: Cluster initialization successful.

[19/May/2008:15:03:49 GMT] [B1004]: Starting the cluster_discovery service using tcp [ 0, 100 ] with min threads 1 and max threads of 1

[19/May/2008:15:03:49 GMT] [B1136]: Processing stored transactions

[19/May/2008:15:03:49 GMT] [B1284]: 0 cluster transactions remain in PREPARED state, 0 in COMMITTED state waiting for remote broker completion

[19/May/2008:15:03:49 GMT] Of 0 remote transactions, 0 in PREPARED state, 0 in COMMITTED state

[19/May/2008:15:03:49 GMT] [B1013]: Auto Creation of Queues is enabled

[19/May/2008:15:03:49 GMT] [B1144]: Creating Dead Message Queue

[19/May/2008:15:03:49 GMT] [B1158]: Administrator has created destination mq.sys.dmq [Queue]

Everything looks fine but the domain won't start. It throws the following error:
[#|2008-05-19T15:03:48.434+0000|INFO|sun-appserver9.1|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=10;_ThreadName=main;|MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...|#]



[#|2008-05-19T15:03:49.249+0000|SEVERE|sun-appserver9.1|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=10;_ThreadName=main;_RequestID=d2a47bb7-7fee-4b46-8e80-c1f6d86942d4;|MQJMSRA_RA4001: start:Aborting:Exception starting EMBEDDED broker=null|#]



[#|2008-05-19T15:03:49.251+0000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=d2a47bb7-7fee-4b46-8e80-c1f6d86942d4;|java.lang.NullPointerException

        at com.sun.messaging.jmq.jmsserver.core.Destination.createDMQ(Destination.java:427)

        at com.sun.messaging.jmq.jmsserver.core.Destination.loadDestinations(Destination.java:4590)

        at com.sun.messaging.jmq.jmsserver.core.Destination.init(Destination.java:5277)

        at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1044)

        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:429)

        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:395)

        at com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:187)

        at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:263)

        at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:472)

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter$1.run(ActiveInboundResourceAdapter.java:135)

        at java.security.AccessController.doPrivileged(Native Method)

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.<init>(ActiveInboundResourceAdapter.java:131)

        at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.<init>(ActiveJmsResourceAdapter.java:248)

        at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:107)

        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:300)

        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:445)

        at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:225)

        at com.sun.enterprise.jms.JmsProviderLifecycle.onStartup(JmsProviderLifecycle.java:428)

        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)

        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)

        at com.sun.enterprise.server.PEMain.run(PEMain.java:411)

        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

|#]



[#|2008-05-19T15:03:49.253+0000|SEVERE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=10;_ThreadName=main;_RequestID=d2a47bb7-7fee-4b46-8e80-c1f6d86942d4;|RAR6035 : Resource adapter start failed : {0}

javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting EMBEDDED broker=null

        at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:476)

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter$1.run(ActiveInboundResourceAdapter.java:135)

        at java.security.AccessController.doPrivileged(Native Method)

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.<init>(ActiveInboundResourceAdapter.java:131)

        at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.<init>(ActiveJmsResourceAdapter.java:248)

        at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:107)

        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:300)

        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:445)

        at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:225)

        at com.sun.enterprise.jms.JmsProviderLifecycle.onStartup(JmsProviderLifecycle.java:428)

        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)

        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)

        at com.sun.enterprise.server.PEMain.run(PEMain.java:411)

        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

Caused by: java.lang.NullPointerException

        at com.sun.messaging.jmq.jmsserver.core.Destination.createDMQ(Destination.java:427)

        at com.sun.messaging.jmq.jmsserver.core.Destination.loadDestinations(Destination.java:4590)

        at com.sun.messaging.jmq.jmsserver.core.Destination.init(Destination.java:5277)

        at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1044)

        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:429)

        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:395)

        at com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:187)

        at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:263)

        at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:472)

        ... 18 more

|#]



[#|2008-05-19T15:03:49.254+0000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=d2a47bb7-7fee-4b46-8e80-c1f6d86942d4;|

com.sun.enterprise.connectors.ConnectorRuntimeException: Failed to start resource adapter : MQJMSRA_RA4001: start:Aborting:Exception starting EMBEDDED broker=null

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.<init>(ActiveInboundResourceAdapter.java:157)

        at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.<init>(ActiveJmsResourceAdapter.java:248)

        at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:107)

        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:300)

        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:445)

        at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:225)

        at com.sun.enterprise.jms.JmsProviderLifecycle.onStartup(JmsProviderLifecycle.java:428)

        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)

        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)

        at com.sun.enterprise.server.PEMain.run(PEMain.java:411)

        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

Caused by: javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting EMBEDDED broker=null

        at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:476)

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter$1.run(ActiveInboundResourceAdapter.java:135)

        at java.security.AccessController.doPrivileged(Native Method)

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.<init>(ActiveInboundResourceAdapter.java:131)

        ... 15 more

Caused by: java.lang.NullPointerException

        at com.sun.messaging.jmq.jmsserver.core.Destination.createDMQ(Destination.java:427)

        at com.sun.messaging.jmq.jmsserver.core.Destination.loadDestinations(Destination.java:4590)

        at com.sun.messaging.jmq.jmsserver.core.Destination.init(Destination.java:5277)

        at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1044)

        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:429)

        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:395)

        at com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:187)

        at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:263)

        at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:472)

        ... 18 more

|#]



[#|2008-05-19T15:03:49.255+0000|INFO|sun-appserver9.1|javax.enterprise.resource.jms|_ThreadID=10;_ThreadName=main;|Failed to start JMS RA|#]



[#|2008-05-19T15:03:49.255+0000|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;com.sun.enterprise.jms.JmsProviderLifecycle_at_be95bf;com.sun.appserv.server.ServerLifecycleException: Failed to start JMS RA;_RequestID=d2a47bb7-7fee-4b46-8e80-c1f6d86942d4;|Service com.sun.enterprise.jms.JmsProviderLifecycle_at_be95bf cannot be started! : com.sun.appserv.server.ServerLifecycleException: Failed to start JMS RA|#]



[#|2008-05-19T15:03:49.255+0000|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=d2a47bb7-7fee-4b46-8e80-c1f6d86942d4;|CORE5071: An error occured during initialization

com.sun.appserv.server.ServerLifecycleException: Failed to start JMS RA

        at com.sun.enterprise.jms.JmsProviderLifecycle.onStartup(JmsProviderLifecycle.java:433)

        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)

        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)

        at com.sun.enterprise.server.PEMain.run(PEMain.java:411)

        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

Caused by: com.sun.enterprise.connectors.ConnectorRuntimeException: Failed to start resource adapter : MQJMSRA_RA4001: start:Aborting:Exception starting EMBEDDED broker=null

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.<init>(ActiveInboundResourceAdapter.java:157)

        at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.<init>(ActiveJmsResourceAdapter.java:248)

        at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:107)

        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:300)

        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:445)

        at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:225)

        at com.sun.enterprise.jms.JmsProviderLifecycle.onStartup(JmsProviderLifecycle.java:428)

        ... 9 more

Caused by: javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting EMBEDDED broker=null

        at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:476)

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter$1.run(ActiveInboundResourceAdapter.java:135)

        at java.security.AccessController.doPrivileged(Native Method)

        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.<init>(ActiveInboundResourceAdapter.java:131)

        ... 15 more

Caused by: java.lang.NullPointerException

        at com.sun.messaging.jmq.jmsserver.core.Destination.createDMQ(Destination.java:427)

        at com.sun.messaging.jmq.jmsserver.core.Destination.loadDestinations(Destination.java:4590)

        at com.sun.messaging.jmq.jmsserver.core.Destination.init(Destination.java:5277)

        at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1044)

        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:429)

        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:395)

        at com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:187)

        at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:263)

        at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:472)

        ... 18 more

|#]

Is it that the Dead Message Queue also wants to be persisted when you define:
imq.persist.store=jdbc

Could somebody point me in the right direction? Or has anybody any experience using the Glassfish JMX with persistent queues with a exotic database?
[Message sent by forum member 'flum3' (flum3)]

http://forums.java.net/jive/thread.jspa?messageID=275219