Saturday, August 31, 2013

Exceptions!!!!! Hornetq Exception solved


java.lang.RuntimeException: HornetQException[errorType=NOT_CONNECTED message=HQ119007: Cannot connect to server(s). Tried with all available servers.]
One of the exception I ran into while experimenting with HORNETQ REST INTERFACE. Hope this saves your time!!!!
This is caused because of not mentioning hornetq and netty dependencies in MANIFEST.MF file. Just add "Dependencies: org.hornetq, org.jboss.netty" in MANIFEST.MF in your WAR file or in your pom.xml.

    org.apache.maven.plugins
    maven-war-plugin
    
     
      
       org.hornetq,org.jboss.netty
      
     
    
   
Exception full stack trace
15:05:57,228 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jms-rest-examples]] (ServerService Thread Pool -- 59) JBWEB000287: Exception sending context initialized event to listener instance of class org.hornetq.rest.integration.RestMessagingBootstrapListener: java.lang.RuntimeException: HornetQException[errorType=NOT_CONNECTED message=HQ119007: Cannot connect to server(s). Tried with all available servers.]
 at org.hornetq.rest.integration.RestMessagingBootstrapListener.contextInitialized(RestMessagingBootstrapListener.java:40) [hornetq-rest-2.3.5.Final.jar:]
 at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
 at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
 at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
 at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]
 at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
 at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
 at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: HornetQException[errorType=NOT_CONNECTED message=HQ119007: Cannot connect to server(s). Tried with all available servers.]
 at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:863) [hornetq-core-client-2.3.5.Final.jar:]
 at org.hornetq.rest.MessageServiceManager.start(MessageServiceManager.java:157) [hornetq-rest-2.3.5.Final.jar:]
 at org.hornetq.rest.integration.RestMessagingBootstrapListener.contextInitialized(RestMessagingBootstrapListener.java:34) [hornetq-rest-2.3.5.Final.jar:]
 ... 12 more

15:05:57,290 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 59) JBWEB001103: Error detected during context /jms-rest-examples start, will stop it
15:05:57,311 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 59) MSC000001: Failed to start service jboss.web.deployment.default-host./jms-rest-examples: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./jms-rest-examples: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
 at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]
 at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
 at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
 at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
 at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161)
 at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)
 at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)
 ... 7 more

2 comments:

  1. Hi,

    We are getting same issue. Trying to connect the JBOSS EAP 6.1 JMS queue from ETL server using the JBoss Client jar. Your help in the issue will be highly appreciated.

    ReplyDelete
  2. can you provide me more details? stacktrace etc.

    ReplyDelete