[jboss-user] [Messaging, JMS & JBossMQ] - ConnectionFactory not bound - Need some help please
sarbu
do-not-reply at jboss.com
Fri Nov 10 14:31:35 EST 2006
Hi all,
I am encountering the ConnectionFactory not bound problem in my setup. I have an active and a standy node in the network. The user-service.xml contains the following for the bootstrap on both systems:
<mbean code="com.zforce.rain.server.boot.Bootstrap" name="attune:service=Bootstrap">
| <depends>jboss.mq.destination:service=Topic,name=AttuneClientChannel</depends>
| <depends>jboss:service=Naming</depends>
| </mbean>
|
In the boot up sequence of the active node, I create a connection and a publisher as described below. The boot up comes up properly and the context lookup for ConnectionFactory succeeds.
env = new Hashtable();
| env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| env.put(Context.PROVIDER_URL, "jnp://localhost:" + port);
| _initCtx = new InitialContext(env);
| Object tmp = _initCtx.lookup("ConnectionFactory");
| TopicConnectionFactory tcf = (TopicConnectionFactory)tmp;
| _conn = tcf.createTopicConnection();
| _conn.setExceptionListener(this);
| _clientTopic = (Topic)_initCtx.lookup("topic/" + SharedConstants.MSG_CLIENT_CHANNEL);
| _sess = _conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
| _clientPublisher = _sess.createPublisher(_clientTopic);
| _clientPublisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
|
In the standby node, I do not execute the above code base during bootup. When the active node reboots, the failover event triggers the execution of the above code in the standby node. But, I get the error listed below.
10.58.02 [] Thread-11 DEBUG [rain.server.msg] establishConnection: Attempting to re-establish the TopicConnection. Retries left = 2
| 10.58.02 [] Thread-11 DEBUG [rain.server.msg] establishConnection: org.jboss.mq.il.uil2.useServerHost = null
| 10.58.02 [] Thread-11 DEBUG [rain.server.msg] establishConnection: jboss.connect.address = null
| 10.58.02 [] Thread-11 DEBUG [rain.server.msg] establishConnection: jboss.jms.bind.address = 172.30.30.200
| 10.58.02 [] Thread-11 DEBUG [rain.server.msg] establishConnection: org.jboss.mq.il.uil2.retryCount = 3
| 10.58.02 [] Thread-11 ERROR [rain.server.msg] establishConnection: Unable to re-establish the TopicConnection. Will re-try in 5 seconds
| javax.naming.NameNotFoundException: ConnectionFactory not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:278)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
The complete stack trace of the above from attaching a debugger is given below:
org.jnp.server.NamingServer.getBinding(NamingServer.java:491),
| org.jnp.server.NamingServer.getBinding(NamingServer.java:499),
| org.jnp.server.NamingServer.getObject(NamingServer.java:505),
| org.jnp.server.NamingServer.lookup(NamingServer.java:278),
| sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method),
| sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39),
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25),
| java.lang.reflect.Method.invoke(Method.java:324),
| sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261),
| sun.rmi.transport.Transport$1.run(Transport.java:148),
| java.security.AccessController.doPrivileged(Native Method),
| sun.rmi.transport.Transport.serviceCall(Transport.java:144),
| sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460),
| sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701),
| java.lang.Thread.run(Thread.java:534),
| sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247),
| sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223),
| sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133),
| org.jnp.server.NamingServer_Stub.lookup(Unknown Source),
| org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610),
| org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572),
| javax.naming.InitialContext.lookup(InitialContext.java:347),
| com.zforce.rain.server.msg.MessageChannel.establishConnection(MessageChannel.java:112),
| com.zforce.rain.server.msg.MessageChannel.init(MessageChannel.java:195),
| com.zforce.rain.server.cluster.ZzzClusterMgr.triggerFailOverSteps(ZzzClusterMgr.java:1193),
| com.zforce.rain.server.cluster.ZzzClusterMgr.handleNodeDownDetection(ZzzClusterMgr.java:1160),
| com.zforce.rain.server.imm.IMMBus$IMMProxy.handleConnectionException(IMMBus.java:551),
| org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:137)
|
However, when I restart the server on the same machine, the boot up sequence continues well. I am quite confused by this. Can anyone please shed some light into this problem. Any help is highly appreciated.
Thanks
Saravanan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985012#3985012
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985012
More information about the jboss-user
mailing list