5 Replies Latest reply on Jan 28, 2016 9:44 AM by Justin Bertram

    Problem by sending a JMS

    Lison Rousseaux Newbie

      Hi, I'm working on an application made 10 years ago. The developpers have used JBoss 6.1.0 but now, I want to use JBoss 7.1.0. I have a problem with a JMS sending. Actually, the program stops when it tries to send a JMS message. It says :

       

      12:20:07,221 DEBUG JmsMessageProducer:65 - Create Jndi Context with :java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=jnp://localhost:1099

      12:20:07,224 DEBUG JmsMessageProducer:71 - Create connexion factory :ConnectionFactory

      12:20:07,231 DEBUG TimedSocketFactory:87 - createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0

      12:20:08,235 TRACE NamingContext:336 - Failed to connect server localhost/127.0.0.1:1099

      javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]

              at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:307)

              at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1746)

              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:695)

              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

              at javax.naming.InitialContext.lookup(InitialContext.java:411)

              at fr.inra.grignon.persyst.web.jms.JmsMessageProducer.sendJmsTextMessage(JmsMessageProducer.java:72)

              at fr.inra.grignon.persyst.web.servlet.DoResultats.doPost(DoResultats.java:407)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

              at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)

              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)

              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)

              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: java.net.ConnectException: Connection refused: connect

              at java.net.DualStackPlainSocketImpl.connect0(Native Method)

              at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)

              at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

              at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

              at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)

              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

              at java.net.Socket.connect(Socket.java:579)

              at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)

              at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)

              at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:303)

              ... 29 more

      12:20:08,276 DEBUG NamingContext:1751 - Failed to connect to localhost:1099

      javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]

              at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:337)

              at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1746)

              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:695)

              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

              at javax.naming.InitialContext.lookup(InitialContext.java:411)

              at fr.inra.grignon.persyst.web.jms.JmsMessageProducer.sendJmsTextMessage(JmsMessageProducer.java:72)

              at fr.inra.grignon.persyst.web.servlet.DoResultats.doPost(DoResultats.java:407)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

              at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)

              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)

              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)

              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

              at java.lang.Thread.run(Thread.java:745)

       

       

      I think that this error comes from JBoss and because I'm using an other version. In the pom.xml of the project, I have <version.org.jboss.jbossas>6.1.0.Final</version.org.jboss.jbossas> and when I want to build it with 7.1.0, it doesn't work.

      Moreover, when I connect to JBoss 7.1, it works.

       

      I don't know what is the problem, if it's because of the version or maybe my configs are not correct.

       

      Can anyone help me to resolve this please ?