Skip to main content

Exception in creating Weblogic JMS bridge to Glassfish

4 replies [Last post]
vivektandon
Offline
Joined: 2009-08-24

Hi,

I am trying to make a JMS bridge from Weblogic 9.2 queue to Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs) queue. I am getting a null pointer exception when weblogic is trying to connect to glassfish and I am not able to find the reason. The Java Version is 1.5.0_03. Below are the logs I am getting.

Logs in command window:

Aug 24, 2009 12:27:14 PM com.sun.appserv.naming.RoundRobinPolicy setClusterInstanceInfo
WARNING: NAM1005 : No Endpoints selected. Please specify using system property com.sun.appserv.iiop.endpoints.
Aug 24, 2009 12:27:16 PM com.sun.appserv.naming.RoundRobinPolicy getEndpointForProviderURL
WARNING: NAM1001: No Endpoints selected in com.sun.appserv.iiop.endpoints property. Using JNDI Provider URL iiop://172.21.135.197:3700 instead
Aug 24, 2009 12:27:56 PM com.sun.appserv.naming.RoundRobinPolicy setClusterInstanceInfo
INFO: endpoint.weight after checking isWeight = 10
Aug 24, 2009 12:27:56 PM com.sun.appserv.naming.RoundRobinPolicy setClusterInstanceInfo
INFO: sumOfAllWeights = 10
Aug 24, 2009 12:28:02 PM com.sun.appserv.naming.S1ASCtxFactory getCorbalocURL
INFO: list[i ] ==> 172.21.135.197:3700
Aug 24, 2009 12:28:02 PM com.sun.appserv.naming.S1ASCtxFactory getCorbalocURL
INFO: corbaloc url ==> iiop:1.2@172.21.135.197:3700
<< eis/jms/WLSConnectionFactoryJNDIXA > ResourceAllocationException thrown by resource adapter on call to ManagedConnectionFactory.createManagedConnection(): "javax.resource.ResourceException: Failed to start the connection ">

Exception in logs:

Exception:java.lang.NullPointerException
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:385)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at weblogic.jms.adapter.JMSBaseConnection.startInternal(JMSBaseConnection.java:261)
at weblogic.jms.adapter.JMSBaseConnection.start(JMSBaseConnection.java:240)
at weblogic.jms.adapter.JMSManagedConnectionFactory.createManagedConnection(JMSManagedConnectionFactory.java:190)
at weblogic.connector.security.layer.AdapterLayer.createManagedConnection(AdapterLayer.java:802)
at weblogic.connector.outbound.ConnectionFactory.createResource(ConnectionFactory.java:91)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1096)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:346)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:294)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:277)
at weblogic.connector.outbound.ConnectionPool.reserveResource(ConnectionPool.java:606)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:271)
at weblogic.connector.outbound.ConnectionManagerImpl.getConnectionInfo(ConnectionManagerImpl.java:352)
at weblogic.connector.outbound.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:307)
at weblogic.connector.outbound.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:115)
at weblogic.jms.adapter.JMSBaseConnectionFactory.getTargetConnection(JMSBaseConnectionFactory.java:123)
at weblogic.jms.bridge.internal.MessagingBridge.getConnections(MessagingBridge.java:860)
at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1051)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

We have included following jars in the weblogic CLASSPATH (in the same order):
appserv-rt.jar
javaee.jar
imqjmsra.jar
rt.jar
appserv-deployment-client.jar
appserv-ext.jar
appserv-admin.jar

Connection settings:
Connection URL: iiop://localhost:3700
Initial Context Factory: com.sun.appserv.naming.S1ASCtxFactory

If anyone know what is the problem please help me.

Thanks,
Vivek

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vivektandon
Offline
Joined: 2009-08-24

I missed java:comp/env/jsm while giving the glassfish connection factory name in weblogic. Because of this I was getting that null pointer exception.

Now I am getting "javax.naming.NameNotFoundException: No object bound for java:comp/env/jms/intelliden_CF".

[i]Exception:
javax.naming.NameNotFoundException: No object bound for java:comp/env/com.bt.intelliden.connectionFactory_CF [Root exception is java.lang.NullPointerException]
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at weblogic.jms.adapter.JMSBaseConnection.startInternal(JMSBaseConnection.java:261)
at weblogic.jms.adapter.JMSBaseConnection.start(JMSBaseConnection.java:240)
at weblogic.jms.adapter.JMSManagedConnectionFactory.createManagedConnection(JMSManagedConnectionFactory.java:190)
at weblogic.connector.security.layer.AdapterLayer.createManagedConnection(AdapterLayer.java:802)
at weblogic.connector.outbound.ConnectionFactory.createResource(ConnectionFactory.java:91)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1096)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:346)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:294)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:277)
at weblogic.connector.outbound.ConnectionPool.reserveResource(ConnectionPool.java:606)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:271)
at weblogic.connector.outbound.ConnectionManagerImpl.getConnectionInfo(ConnectionManagerImpl.java:352)
at weblogic.connector.outbound.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:307)
at weblogic.connector.outbound.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:115)
at weblogic.jms.adapter.JMSBaseConnectionFactory.getTargetConnection(JMSBaseConnectionFactory.java:123)
at weblogic.jms.bridge.internal.MessagingBridge.getConnections(MessagingBridge.java:860)
at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1051)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
java.lang.NullPointerException
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at weblogic.jms.adapter.JMSBaseConnection.startInternal(JMSBaseConnection.java:261)
at weblogic.jms.adapter.JMSBaseConnection.start(JMSBaseConnection.java:240)
at weblogic.jms.adapter.JMSManagedConnectionFactory.createManagedConnection(JMSManagedConnectionFactory.java:190)
at weblogic.connector.security.layer.AdapterLayer.createManagedConnection(AdapterLayer.java:802)
at weblogic.connector.outbound.ConnectionFactory.createResource(ConnectionFactory.java:91)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1096)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:346)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:294)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:277)
at weblogic.connector.outbound.ConnectionPool.reserveResource(ConnectionPool.java:606)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:271)
at weblogic.connector.outbound.ConnectionManagerImpl.getConnectionInfo(ConnectionManagerImpl.java:352)
at weblogic.connector.outbound.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:307)
at weblogic.connector.outbound.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:115)
at weblogic.jms.adapter.JMSBaseConnectionFactory.getTargetConnection(JMSBaseConnectionFactory.java:123)
at weblogic.jms.bridge.internal.MessagingBridge.getConnections(MessagingBridge.java:860)
at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1051)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)[/i]

Can anyone help me.

Connection Factory in Glassfish : intelliden_CF
Queue in Glassfish : jms/mddc_to_intelliden

Destination Connection factory in Weblogic : java:comp/env/jsm/intelliden_CF
Destination Queue in Weblogic : jms/mddc_to_intelliden

matterbury
Offline
Joined: 2008-05-01

The root cause is still a NULL pointer exception so I doubt that adding java:comp/env/jsm actually any difference. What are your JNDI server properties? In other words, what JNDI server have you configured it to lookup? Just the default?

vivektandon
Offline
Joined: 2009-08-24

The setting i have given in weblogic bridge is:

Adapter JNDI Name: eis.jms.WLSConnectionFactoryJNDINoTX
Connection URL: iiop://172.21.135.197:3700
Initial Context Factory: com.sun.appserv.naming.S1ASCtxFactory
Connection Factory JNDI Name: java:comp/env/jms/intelliden_CF
Destination JNDI Name: jms/mddc_to_intelliden

Any other thing need to be set?

vivektandon
Offline
Joined: 2009-08-24

Thanks for the help.

The last exception I am getting is "com.sun.enterprise.connectors.ConnectorRuntimeException: Failed to look up ConnectorDescriptor from JNDI" when Weblogic try to connect to Glassfish queue.

Its a reported bug in Glassfish, you can't connect to Glassfish from a foreign web server.

https://glassfish.dev.java.net/issues/show_bug.cgi?id=4159

Is there any other way to create a stand alone bridge (supporting XA transaction) like using java code or something.

Thanks,
Vivek