[jboss-user] [JBoss Messaging] - NullPointerException while setting Bridge
YogeshGLX
do-not-reply at jboss.com
Fri Nov 28 07:31:57 EST 2008
Hi,
I'm configuring jboss messaging bridge. Both the source and destination are jboss messaging 1.4 which are deployed on jboss-eap 4.3.
I have configured a Remote JMSProvider in jms-ds.xml as:
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider,server=Another">
| <attribute name="ProviderName">RemoteJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jnp.interfaces
| java.naming.provider.url=anotherjboss:1099
| </attribute>
| <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
| </mbean>
|
This is the only change I have done to configure bridge apart from actual Bridge mbean config. which is :
| <mbean code="org.jboss.jms.server.bridge.BridgeService"
| name="jboss.messaging:service=Bridge,name=BridgeToRemote"
| xmbean-dd="xmdesc/Bridge-xmbean.xml">
|
| <depends optional-attribute-name="SourceProviderLoader">
| jboss.messaging:service=JMSProviderLoader,name=LocalJMSProvider</depends>
|
| <depends optional-attribute-name="TargetProviderLoader">
| jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider,server=Another</depends>
|
| <attribute name="SourceDestinationLookup">/queue/A</attribute>
|
| <attribute name="TargetDestinationLookup">/queue/B</attribute>
|
| <attribute name="SourceUsername">user1</attribute>
| <attribute name="SourcePassword">pwd1</attribute>
|
| <attribute name="TargetUsername">user2</attribute>
| <attribute name="TargetPassword">pwd2</attribute>
|
|
| <!-- Optional: The Quality Of Service mode to use, one of:
| QOS_AT_MOST_ONCE = 0;
| QOS_DUPLICATES_OK = 1;
| QOS_ONCE_AND_ONLY_ONCE = 2; -->
| <attribute name="QualityOfServiceMode">2</attribute>
|
| <attribute name="MaxBatchSize">5</attribute>
|
| <attribute name="MaxBatchTime">-1</attribute>
|
| <attribute name="FailureRetryInterval">50000</attribute>
|
| <attribute name="MaxRetries">-1</attribute>
|
| <attribute name="AddMessageIDInHeader">false</attribute>
|
| </mbean>
|
Another jboss is up and running but the bridge is unable to connect. I get a NPE like this:
12:12:41,250 WARN [Bridge] Failed to set up connections
java.lang.NullPointerException
at javax.naming.InitialContext.getURLScheme(InitialContext.java:228)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:277)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.jms.server.bridge.JNDIFactorySupport.createObject(JNDIFactorySupport.java:66)
at org.jboss.jms.server.bridge.JNDIConnectionFactoryFactory.createConnectionFactory(JNDIConnectionFactoryFactory.java:46)
at org.jboss.jms.server.bridge.Bridge.createConnection(Bridge.java:832)
at org.jboss.jms.server.bridge.Bridge.setupJMSObjects(Bridge.java:944)
at org.jboss.jms.server.bridge.Bridge.setupJMSObjectsWithRetry(Bridge.java:1152)
at org.jboss.jms.server.bridge.Bridge.access$1500(Bridge.java:66)
at org.jboss.jms.server.bridge.Bridge$FailureHandler.run(Bridge.java:1507)
at java.lang.Thread.run(Thread.java:595)
I further checked for any problems and just BEFORE this exception I'm getting another exception in PropertyEditors from jboss util package. Here is the stack trace for that exception:
12:21:05,341 TRACE [PropertyEditors] Failed to find property editor for: onewayThreadPool
12:21:05,341 TRACE [PropertyEditors] Failed to write property
java.lang.NullPointerException
at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(PropertyEditors.java:373)
at org.jboss.remoting.transport.socket.SocketServerInvoker.setup(SocketServerInvoker.java:155)
at org.jboss.remoting.transport.bisocket.BisocketServerInvoker.setup(BisocketServerInvoker.java:510)
at org.jboss.remoting.ServerInvoker.create(ServerInvoker.java:836)
at org.jboss.remoting.transport.Connector.init(Connector.java:430)
at org.jboss.remoting.transport.Connector.create(Connector.java:777)
at org.jboss.remoting.transport.Connector.start(Connector.java:301)
at org.jboss.remoting.Client.addListener(Client.java:918)
at org.jboss.jms.client.remoting.JMSRemotingConnection.addInvokerCallbackHandler(JMSRemotingConnection.java:230)
at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:340)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:154)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:83)
at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
at org.jboss.jms.client.JBossConnectionFactory.createXAConnection(JBossConnectionFactory.java:128)
at org.jboss.jms.server.bridge.Bridge.createConnection(Bridge.java:858)
at org.jboss.jms.server.bridge.Bridge.setupJMSObjects(Bridge.java:940)
at org.jboss.jms.server.bridge.Bridge.setupJMSObjectsWithRetry(Bridge.java:1152)
at org.jboss.jms.server.bridge.Bridge.access$1500(Bridge.java:66)
at org.jboss.jms.server.bridge.Bridge$FailureHandler.run(Bridge.java:1507)
at java.lang.Thread.run(Thread.java:595)
I don't know if they are related, but still worth mentioning.
Also as an additional info. Both Jboss are simple standard stand-alone configurations with no fail-over/clustering configured.
why am I getting an NPE when Bridge is setting up connections?
Cheers,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193004#4193004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193004
More information about the jboss-user
mailing list