2 Replies Latest reply on Apr 1, 2004 11:59 AM by f2racer

    Getting occasional Exceptions when sending messages to JBoss

    f2racer Newbie

      Hey guys, I have an application which uses MDB to drive an async process flow. But in running the app, there are numerous occasions when sending a message to the Queue fails. Here are a couple of the exceptions I'm getting:

      14:48:22,486 ERROR [MessageHelper] Attempting to send a message: Cannot authenticate user; - nested throwable: (java.net.BindExcepti
      on: Address already in use: connect)
      14:48:22,486 ERROR [STDERR] org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.BindException: Add
      ress already in use: connect)
      14:48:22,501 ERROR [STDERR] at org.jboss.mq.Connection.authenticate(Connection.java:883)
      14:48:22,501 ERROR [STDERR] at org.jboss.mq.Connection.<init>(Connection.java:238)
      14:48:22,501 ERROR [STDERR] at org.jboss.mq.Connection.<init>(Connection.java:315)
      14:48:22,501 ERROR [STDERR] at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:60)
      14:48:22,501 ERROR [STDERR] at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:116)
      14:48:22,501 ERROR [STDERR] at com.fmrco.sai.carat_auto.jms.mdb.MessageHelper.sendTextAsMessage(MessageHelper.java:121)
      14:48:22,501 ERROR [STDERR] at com.fmrco.sai.carat_auto.statemgmt.StateManager.sendSuccNextAccountStateByClassName(StateManager.
      java(Compiled Code))
      14:48:22,501 ERROR [STDERR] at com.fmrco.sai.carat_auto.pojo.TradeRecommendationEngine.execTradeRecommendationEngine(TradeRecomm
      endationEngine.java:38)
      14:48:22,501 ERROR [STDERR] at com.fmrco.sai.carat_auto.jms.mdb.TREMessageEJB.onMessage(TREMessageEJB.java:163)
      14:48:22,501 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
      14:48:22,501 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
      
      14:48:22,501 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:460)
      
      14:48:22,501 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionIntercept
      or.java:185)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.ja
      va:62)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:240)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122
      )
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:374)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:700)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:824)
      14:48:22,501 ERROR [STDERR] at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.j
      ava:1114)
      14:48:22,501 ERROR [STDERR] at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
      14:48:22,501 ERROR [STDERR] at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:633)
      14:48:22,501 ERROR [STDERR] at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:433)
      14:48:22,501 ERROR [STDERR] at org.jboss.mq.SpySession.run(SpySession.java:298)
      14:48:22,501 ERROR [STDERR] at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      14:48:22,501 ERROR [STDERR] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
      14:48:22,501 ERROR [STDERR] at java.lang.Thread.run(Thread.java:568)
      14:48:22,501 ERROR [STDERR] Caused by: java.net.BindException: Address already in use: connect
      14:48:22,501 ERROR [STDERR] at java.net.PlainSocketImpl.socketConnect(Native Method)
      14:48:22,501 ERROR [STDERR] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java(Compiled Code))
      14:48:22,501 ERROR [STDERR] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java(Compiled Code))
      14:48:22,501 ERROR [STDERR] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java(Compiled Code))
      14:48:22,501 ERROR [STDERR] at java.net.Socket.connect(Socket.java(Compiled Code))
      14:48:22,501 ERROR [STDERR] at java.net.Socket.connect(Socket.java(Inlined Compiled Code))
      14:48:22,501 ERROR [STDERR] at java.net.Socket.<init>(Socket.java(Compiled Code))
      14:48:22,501 ERROR [STDERR] at java.net.Socket.<init>(Socket.java(Compiled Code))
      14:48:22,501 ERROR [STDERR] at javax.net.DefaultSocketFactory.createSocket(Unknown Source)
      14:48:22,517 ERROR [STDERR] at org.jboss.mq.il.oil.OILServerIL.createConnection(OILServerIL.java:563)
      14:48:22,517 ERROR [STDERR] at org.jboss.mq.il.oil.OILServerIL.checkConnection(OILServerIL.java(Compiled Code))
      14:48:22,517 ERROR [STDERR] at org.jboss.mq.il.oil.OILServerIL.authenticate(OILServerIL.java:289)
      14:48:22,517 ERROR [STDERR] at org.jboss.mq.Connection.authenticate(Connection.java:876)
      14:48:22,517 ERROR [STDERR] ... 31 more
      


      and

      14:47:52,189 ERROR [OILClientIL] Cannot connect to the ConnectionReceiver/Server
      java.net.BindException: Address already in use: connect
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java(Compiled Code))
       at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java(Compiled Code))
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java(Compiled Code))
       at java.net.Socket.connect(Socket.java(Compiled Code))
       at java.net.Socket.connect(Socket.java(Inlined Compiled Code))
       at java.net.Socket.<init>(Socket.java(Compiled Code))
       at java.net.Socket.<init>(Socket.java(Compiled Code))
       at org.jboss.mq.il.oil.OILClientIL.createConnection(OILClientIL.java:175)
       at org.jboss.mq.il.oil.OILClientIL.checkSocket(OILClientIL.java(Compiled Code))
       at org.jboss.mq.il.oil.OILClientIL.pong(OILClientIL.java:112)
       at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:836)
       at org.jboss.mq.server.JMSServerInterceptorSupport.ping(JMSServerInterceptorSupport.java:309)
       at org.jboss.mq.server.TracingInterceptor.ping(TracingInterceptor.java:859)
       at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java(Compiled Code))
       at java.lang.Thread.run(Thread.java(Compiled Code))
      14:47:52,189 WARN [OILServerILService] Client request resulted in a server exception:
      org.jboss.mq.SpyJMSException: Could not pong; - nested throwable: (java.rmi.RemoteException: Cannot connect to the ConnectionReceive
      r/Server)
       at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:840)
       at org.jboss.mq.server.JMSServerInterceptorSupport.ping(JMSServerInterceptorSupport.java:309)
       at org.jboss.mq.server.TracingInterceptor.ping(TracingInterceptor.java:859)
       at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java(Compiled Code))
       at java.lang.Thread.run(Thread.java(Compiled Code))
      Caused by: java.rmi.RemoteException: Cannot connect to the ConnectionReceiver/Server
       at org.jboss.mq.il.oil.OILClientIL.createConnection(OILClientIL.java:183)
       at org.jboss.mq.il.oil.OILClientIL.checkSocket(OILClientIL.java(Compiled Code))
       at org.jboss.mq.il.oil.OILClientIL.pong(OILClientIL.java:112)
       at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:836)
       ... 4 more
      14:47:52,189 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.mq.SpyJMSException is assignable
       from: class org.jboss.mq.SpyJMSException
      14:47:52,189 WARN [Connection] Connection failure:
      org.jboss.mq.SpyJMSException: Could not pong; - nested throwable: (java.rmi.RemoteException: Cannot connect to the ConnectionReceive
      r/Server)
       at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:840)
       at org.jboss.mq.server.JMSServerInterceptorSupport.ping(JMSServerInterceptorSupport.java:309)
       at org.jboss.mq.server.TracingInterceptor.ping(TracingInterceptor.java:859)
       at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java(Compiled Code))
       at java.lang.Thread.run(Thread.java(Compiled Code))
      Caused by: java.rmi.RemoteException: Cannot connect to the ConnectionReceiver/Server
       at org.jboss.mq.il.oil.OILClientIL.createConnection(OILClientIL.java:183)
       at org.jboss.mq.il.oil.OILClientIL.checkSocket(OILClientIL.java(Compiled Code))
       at org.jboss.mq.il.oil.OILClientIL.pong(OILClientIL.java:112)
       at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:836)
       ... 4 more
      
      14:47:46,048 ERROR [OILClientIL] Cannot connect to the ConnectionReceiver/Server
      java.net.BindException: Address already in use: connect
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java(Compiled Code))
       at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java(Compiled Code))
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java(Compiled Code))
       at java.net.Socket.connect(Socket.java(Compiled Code))
       at java.net.Socket.connect(Socket.java(Inlined Compiled Code))
       at java.net.Socket.<init>(Socket.java(Compiled Code))
       at java.net.Socket.<init>(Socket.java(Compiled Code))
       at org.jboss.mq.il.oil.OILClientIL.createConnection(OILClientIL.java:175)
       at org.jboss.mq.il.oil.OILClientIL.checkSocket(OILClientIL.java(Compiled Code))
       at org.jboss.mq.il.oil.OILClientIL.pong(OILClientIL.java:112)
       at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:836)
       at org.jboss.mq.server.JMSServerInterceptorSupport.ping(JMSServerInterceptorSupport.java:309)
       at org.jboss.mq.server.TracingInterceptor.ping(TracingInterceptor.java:859)
       at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java(Compiled Code))
       at java.lang.Thread.run(Thread.java(Compiled Code))
      14:47:46,048 WARN [OILServerILService] Client request resulted in a server exception:
      org.jboss.mq.SpyJMSException: Could not pong; - nested throwable: (java.rmi.RemoteException: Cannot connect to the ConnectionReceive
      r/Server)
       at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:840)
       at org.jboss.mq.server.JMSServerInterceptorSupport.ping(JMSServerInterceptorSupport.java:309)
       at org.jboss.mq.server.TracingInterceptor.ping(TracingInterceptor.java:859)
       at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java(Compiled Code))
       at java.lang.Thread.run(Thread.java(Compiled Code))
      Caused by: java.rmi.RemoteException: Cannot connect to the ConnectionReceiver/Server
       at org.jboss.mq.il.oil.OILClientIL.createConnection(OILClientIL.java:183)
       at org.jboss.mq.il.oil.OILClientIL.checkSocket(OILClientIL.java(Compiled Code))
       at org.jboss.mq.il.oil.OILClientIL.pong(OILClientIL.java:112)
      


      Does anybody know why this is happening? On the good side, I'm able to guarantee all messages getting sent by putting a resend in the catch of the JMSException on a sent message, but this doesn't seem like the right approach for this issue...

      Thanks!