HAJMS: SpyJMSException after fail-over of master node
ckmod Nov 18, 2004 8:37 AMHi,
we are using a cluster of 2 jboss 3.2.6 server running hajms. Everything works fine until the master node is shutdown. The other server is taking over and starts the jms server correctly.
But when I try to put a message in the queue I get the following error. Here is the code I use to put the message in the queue:
QueueConnection con = null;
QueueSession session = null;
try
{
// Connection-Factory zur Queue aus JNDI-Tree holen
con = this.queueConnectionFactory.createQueueConnection("guest", "guest");
session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
Queue queue = (Queue) ctx.lookup(this.queueName);
QueueSender sender = session.createSender(queue);
ObjectMessage message = session.createObjectMessage();
message.setObject(obj);
con.start();
sender.send(message);
session.commit();
Help is greatly appreciated since we cannot deploy the cluster to our production environment because of this problem.
Claus Kolb
2004-11-18 14:26:55,140 ERROR [de.fs24.services.eai.j2ee.jms.JmsQueueHelper] JMS Queue-Fehler beim Einstellen des Objektes de.fs24.phv.eai.PHVEaiSessionBean$PhvProcessingMessage@ddc2c2
org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.ConnectException: Connection refused: connect)
at org.jboss.mq.Connection.authenticate(Connection.java:1168)
at org.jboss.mq.Connection.(Connection.java:255)
at org.jboss.mq.SpyConnection.(SpyConnection.java:55)
at org.jboss.mq.SpyConnectionFactory.createConnection(SpyConnectionFactory.java:108)
at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:129)
at de.fs24.services.eai.j2ee.jms.JmsQueueHelper.putObjectMessageInQueue(JmsQueueHelper.java:132)
at de.fs24.phv.eai.PHVEaiSessionBean.generateAngebotMessage(PHVEaiSessionBean.java:265)
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:324)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:709)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
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:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.(Socket.java:309)
at java.net.Socket.(Socket.java:124)
at javax.net.DefaultSocketFactory.createSocket(DashoA12275)
at org.jboss.mq.il.uil2.UILServerIL.createConnection(UILServerIL.java:642)
at org.jboss.mq.il.uil2.UILServerIL.getSocketMgr(UILServerIL.java:532)
at org.jboss.mq.il.uil2.UILServerIL.authenticate(UILServerIL.java:334)
at org.jboss.mq.Connection.authenticate(Connection.java:1160)
... 42 more