Hi, I'm seeing a NullPointerException from the message broker. Looking at the
code, TransactionList is calling Globals.getClusterManager but the field
returned has not yet been initialised. Please does anyone know if this is a
misconfiguration or a bug, and what I have to do to get past it? From reading
the doc it seems GlassFish is meant to configure a master-broker cluster
fully automatically.
My setup is two Ubuntu 10.10 VirtualBoxes, ubu1 and ubu2, with domain 'cms'
on ubu1 portbase 5000 running cluster 'cluster'. Nodes 'localhost-cms' and
'ubu2' with instances 'i1' and 'i2' respectively. I can post a log of all the
asadmin commands used to initialise the environment if that would help.
[code]
[#|2011-08-30T16:31:02.918+0100|INFO|glassfish3.1.1|javax.enterprise.resource.jms.com.sun.enterprise.connectors.jms.system|_ThreadID=27;_ThreadName=Thread-2;|JMS010:
ADDRESSLIST in setJmsServiceProvider:
mq://localhost:27676/,mq://ubu2:27676/|#]
[#|2011-08-30T16:31:02.930+0100|INFO|glassfish3.1.1|javax.enterprise.resource.jms.com.sun.enterprise.connectors.jms.system|_ThreadID=27;_ThreadName=Thread-2;|JMS08:
JMS Service Connection URL is : mq://localhost:27676/,mq://ubu2:27676/|#]
[#|2011-08-30T16:31:03.004+0100|INFO|glassfish3.1.1|org.hibernate.validator.engine.resolver.DefaultTraversableResolver|_ThreadID=27;_ThreadName=Thread-2;|Instantiated
an instance of
org.hibernate.validator.engine.resolver.JPATraversableResolver.|#]
[#|2011-08-30T16:31:03.056+0100|INFO|glassfish3.1.1|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=27;_ThreadName=Thread-2;|MQJMSRA_RA1101:
GlassFish MQ JMS Resource Adapter: Version: 4.5.1 (Build 3-b) Compile:
Tue Jun 21 16:31:32 PDT 2011|#]
[#|2011-08-30T16:31:03.070+0100|INFO|glassfish3.1.1|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=27;_ThreadName=Thread-2;|MQJMSRA_RA1101:
GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection
mode is TCP|#]
[#|2011-08-30T16:31:05.881+0100|SEVERE|glassfish3.1.1|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=27;_ThreadName=Thread-2;|MQJMSRA_RA4001:
start:Aborting:Exception starting EMBEDDED
broker=java.lang.NullPointerException|#]
[#|2011-08-30T16:31:05.882+0100|INFO|glassfish3.1.1|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=27;_ThreadName=Thread-2;|SJSMQ
LifecycleManagedBroker configuration=
brokerInstanceName =clusteri1
brokerBindAddress =null
brokerPort =27676
brokerHomeDir =/usr/local/glassfish3/mq
brokerLibDir =/usr/local/glassfish3/mq/lib
brokerVarDir
=/usr/local/glassfish3/glassfish/nodes/localhost-cms/i1/imq
brokerJavaDir
=/usr/lib/jvm/java-6-sun-1.6.0.26/jre
brokerArgs =null
MasterBroker =mq://localhost:27676/
brokerId =null
adminUsername =admin
adminPassword =<default>
adminPassFile =null
ConnectionURL
=mq://localhost:27676/,mq://ubu2:27676/
dbType =null
dbProps ={}
dsProps ={}
useJNDIRmiServiceURL =true
useSSLJMXConnector =true
brokerEnableHA =false
clusterId =null
rmiRegistryPort =28686
startRmiRegistry =false
brokerStartTimeout =
jmxServiceURL =null
60000
|#]
[#|2011-08-30T16:31:05.889+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=27;_ThreadName=Thread-2;|java.lang.RuntimeException:
java.lang.NullPointerException
at
com.sun.messaging.jmq.jmsclient.runtime.impl.BrokerInstanceImpl.start(BrokerInstanceImpl.java:211)
at
com.sun.messaging.jms.blc.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:331)
at
com.sun.messaging.jms.blc.LifecycleManagedBroker.start(LifecycleManagedBroker.java:454)
at
com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:383)
at
com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter$1.run(ActiveJmsResourceAdapter.java:360)
at java.security.AccessController.doPrivileged(Native Method)
at
com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.startResourceAdapter(ActiveJmsResourceAdapter.java:353)
at
com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.init(ActiveOutboundResourceAdapter.java:129)
at
com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl.init(ActiveInboundResourceAdapterImpl.java:90)
at
com.sun.enterprise.connectors.ActiveRAFactory.instantiateActiveResourceAdapter(ActiveRAFactory.java:135)
at
com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:106)
at
com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:212)
at
com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:348)
at
com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:357)
at
com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:183)
at
com.sun.enterprise.connectors.ConnectorRuntime.loadDeferredResourceAdapter(ConnectorRuntime.java:1262)
at
com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.getActiveResourceAdapter(ConnectorMessageBeanClient.java:286)
at
com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:184)
at
com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:205)
at
com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:121)
at
org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:230)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
at
org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:257)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at
org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:186)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1045)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at
com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
at
com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at
com.sun.messaging.jmq.jmsserver.data.TransactionList.<init>(TransactionList.java:182)
at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1170)
at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:456)
at
com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:164)
at
com.sun.messaging.jmq.jmsserver.DirectBrokerProcess.start(DirectBrokerProcess.java:92)
at
com.sun.messaging.jmq.jmsclient.runtime.impl.BrokerInstanceImpl.start(BrokerInstanceImpl.java:206)
... 52 more
|#]
[/code]
I found mention of a property
"imq.cluster.nowaitForMasterBrokerTimeoutInSeconds" here:
http://blogs.oracle.com/satish/entry/enhancements_to_jms_clustering_in
The web console and asadmin create-jms-host don't seem to support properties
though so I added it to cluster-config in domains/cms/config/domain.xml (see
below). However it didn't seem to help after a domain and cluster restart,
perhaps unsurprisingly since my error seems different to the one Satish is
describing.
[code]
<jms-service addresslist-behavior="priority"
default-jms-host="default_JMS_host" type="EMBEDDED">
<jms-host port="${JMS_PROVIDER_PORT}" host="localhost"
name="default_JMS_host">
<property
name="imq.cluster.nowaitForMasterBrokerTimeoutInSeconds"
value="120"></property>
</jms-host>
</jms-service>
[/code]
--
[Message sent by forum member 'lxs2']
View Post: http://forums.java.net/node/839351