7 Replies Latest reply on Apr 19, 2013 7:35 AM by John Wasmat

    Hornetq-Configuration.xml No protocol exception.

    John Wasmat Newbie

      Hello,

       

      I`m having problems deploying my .war file in jboss . Following is my hornetqq-configuration.xml file. I`m struggling with this for a week and fnally decided to start a discussion to see if I`m missing anything.

       

      <configuration xmlns="urn:hornetq"

                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                     xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

       

          <persistence-enabled>false</persistence-enabled>

          <!-- Connectors -->

       

          <connectors>

              <connector name="in-vm">

                  <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>

              </connector>

              <connector name="netty-connector">

                        <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

              <param key="host" value="${jboss.bind.address:localhost}" />

                 <param key="port" value="${hornetq.remoting.netty.port:5445}" />

              </connector>

          </connectors>

       

          <acceptors>

              <acceptor name="in-vm">

                  <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>

              </acceptor>

              <acceptor name="netty-acceptor">

                 <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

                             <param key="host" value="${jboss.bind.address:localhost}" />

                 <param key="port" value="${hornetq.remoting.netty.port:5445}" />                

              </acceptor>

          </acceptors>

       

          <!-- Other config -->

          <queues>  

            <queue name="jms.queue.jmsFormTest">

               <address>jms.queue.jmsFormTest</address>

            </queue>

        </queues>

       

          <security-settings>

              <!--security for example queue-->

              <security-setting match="#">

                  <permission type="createDurableQueue" roles="guest"/>

                  <permission type="deleteDurableQueue" roles="guest"/>

                  <permission type="createNonDurableQueue" roles="guest"/>

                  <permission type="deleteNonDurableQueue" roles="guest"/>

                  <permission type="consume" roles="guest"/>

                  <permission type="send" roles="guest"/>

              </security-setting>

          </security-settings>

       

      </configuration>

       

      and following is the error I`m getting

       

      22:54:01,492 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/testwebproj]] (MSC service thread 1-4) Exception sending context initialized event to listener instance of class org.hornetq.rest.integration.HornetqBootstrapListener: java.lang.RuntimeException: java.net.MalformedURLException: no protocol: hornetq-configuration.xml

                at org.hornetq.rest.integration.HornetqBootstrapListener.contextInitialized(HornetqBootstrapListener.java:28) [hornetq-rest-2.3.0.Alpha.jar:]

                at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

      Caused by: java.net.MalformedURLException: no protocol: hornetq-configuration.xml

                at java.net.URL.<init>(URL.java:585) [rt.jar:1.7.0_17]

                at java.net.URL.<init>(URL.java:482) [rt.jar:1.7.0_17]

                at java.net.URL.<init>(URL.java:431) [rt.jar:1.7.0_17]

                at org.hornetq.core.config.impl.FileConfiguration.start(FileConfiguration.java:67) [hornetq-core-2.2.13.Final.jar:]

                at org.hornetq.core.server.embedded.EmbeddedHornetQ.initStart(EmbeddedHornetQ.java:86) [hornetq-core-2.2.13.Final.jar:]

                at org.hornetq.jms.server.embedded.EmbeddedJMS.start(EmbeddedJMS.java:88) [hornetq-jms-2.2.13.Final.jar:]

                at org.hornetq.rest.integration.HornetqBootstrapListener.contextInitialized(HornetqBootstrapListener.java:24) [hornetq-rest-2.3.0.Alpha.jar:]

                ... 8 more

       

       

      22:54:01,671 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/testwebproj]] (MSC service thread 1-4) Exception sending context initialized event to listener instance of class org.hornetq.rest.integration.RestMessagingBootstrapListener: java.lang.RuntimeException: HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]

                at org.hornetq.rest.integration.RestMessagingBootstrapListener.contextInitialized(RestMessagingBootstrapListener.java:40) [hornetq-rest-2.3.0.Alpha.jar:]

                at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

      Caused by: HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]

                at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:769) [hornetq-core-2.2.13.Final.jar:]

                at org.hornetq.rest.MessageServiceManager.start(MessageServiceManager.java:153) [hornetq-rest-2.3.0.Alpha.jar:]

                at org.hornetq.rest.integration.RestMessagingBootstrapListener.contextInitialized(RestMessagingBootstrapListener.java:34) [hornetq-rest-2.3.0.Alpha.jar:]

                ... 8 more

       

       

      22:54:01,723 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-4) Error listenerStart

      22:54:01,723 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-4) Context [/testwebproj] startup failed due to previous errors

      22:54:01,740 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/testwebproj]] (MSC service thread 1-4) Exception sending context destroyed event to listener instance of class org.hornetq.rest.integration.HornetqBootstrapListener: java.lang.RuntimeException: java.lang.NullPointerException

                at org.hornetq.rest.integration.HornetqBootstrapListener.contextDestroyed(HornetqBootstrapListener.java:40) [hornetq-rest-2.3.0.Alpha.jar:]

                at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3489) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3999) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3917) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

      Caused by: java.lang.NullPointerException

                at org.hornetq.jms.server.embedded.EmbeddedJMS.stop(EmbeddedJMS.java:107) [hornetq-jms-2.2.13.Final.jar:]

                at org.hornetq.rest.integration.HornetqBootstrapListener.contextDestroyed(HornetqBootstrapListener.java:36) [hornetq-rest-2.3.0.Alpha.jar:]

                ... 9 more

       

       

      22:54:01,752 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.web.deployment.default-host./testwebproj: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./testwebproj: JBAS018040: Failed to start context

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]