2 Replies Latest reply on Jul 21, 2011 6:40 PM by Richard Clarke

    Unexpected element '{urn:jboss:domain:messaging:1.0}subsystem

    Richard Clarke Newbie

      Hi,

      I am trying to set up a simple queue and getting this error.

       

      Not sure if I am doing this correctly (obviously not), but I am adding the following into standalone.xml in with the other <subsystem.....> blocks under <profile> and then accessing in my app using;

       

               @Resource(mappedName="java:/JmsXA")

               private static ConnectionFactory connectionFactory;

       

              @Resource(mappedName="java:/queue/piscesRequestQueue")

              private static Queue queue;

       

      standalone.xml

      ---------------------------------

      ...

      ...

      <subsystem xmlns="urn:jboss:domain:messaging:1.0">

      <jms-connection-factories>

                    <connection-factory name="InVmConnectionFactory">

                       <connectors>

                          <connector-ref connector-name="in-vm"/>

                       </connectors>

                       <entries>

                          <entry name="java:/ConnectionFactory"/>

                       </entries>

                    </connection-factory>

                 </jms-connection-factories>

      <jms-destinations>

             <jms-queue name="piscesRequestQueue">

                 <entry name="queue/piscesRequestQueue"/>

             </jms-queue>

         </jms-destinations>

      </subsystem>

      ...

      ...

       

       

      JBOSS AS 7.0.0.Final is not able to parse this file giving the following errors on startup;

       

       

      Calling C:\jboss-as-7.0.0.Final\bin\standalone.conf.bat

      ===============================================================================

       

       

        JBoss Bootstrap Environment

       

       

        JBOSS_HOME: C:\jboss-as-7.1.0.Alpha1-SNAPSHOT

       

       

        JAVA: C:\Program Files\Java\jdk1.6.0_20\jre\bin\java

       

       

        JAVA_OPTS: -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman

      -server

       

       

      ===============================================================================

       

       

      23:19:59,298 INFO  [org.jboss.modules] JBoss Modules version 1.0.1.GA

      23:19:59,480 INFO  [org.jboss.msc] JBoss MSC version 1.0.0.GA

      23:19:59,521 INFO  [org.jboss.as] JBoss AS 7.1.0.Alpha1-SNAPSHOT "Lightning" starting

      23:19:59,920 ERROR [stderr] Exception in thread "Controller Boot Thread" java.lang.RuntimeException: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration

      23:19:59,920 ERROR [stderr]     at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:89)

      23:19:59,920 ERROR [stderr]     at java.lang.Thread.run(Thread.java:619)

      23:19:59,921 ERROR [stderr] Caused by: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration

      23:19:59,921 ERROR [stderr]     at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:115)

      23:19:59,921 ERROR [stderr]     at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:104)

      23:19:59,921 ERROR [stderr]     at org.jboss.as.server.ServerService.boot(ServerService.java:193)

      23:19:59,922 ERROR [stderr]     at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:83)

      23:19:59,922 ERROR [stderr]     ... 1 more

      23:19:59,922 ERROR [stderr] Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[310,1]

      23:19:59,922 ERROR [stderr] Message: Unexpected element '{urn:jboss:domain:messaging:1.0}subsystem'

      23:19:59,923 ERROR [stderr]     at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:98)

      23:19:59,923 ERROR [stderr]     at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)

      23:19:59,923 ERROR [stderr]     at org.jboss.as.controller.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:311)

      23:19:59,923 ERROR [stderr]     at org.jboss.as.controller.parsing.StandaloneXml.readServerElement(StandaloneXml.java:163)

      23:19:59,924 ERROR [stderr]     at org.jboss.as.controller.parsing.StandaloneXml.readElement(StandaloneXml.java:91)

      23:19:59,924 ERROR [stderr]     at org.jboss.as.controller.parsing.StandaloneXml.readElement(StandaloneXml.java:79)

      23:19:59,924 ERROR [stderr]     at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:100)

      23:19:59,924 ERROR [stderr]     at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:59)

      23:19:59,925 ERROR [stderr]     at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:107)

      23:19:59,925 ERROR [stderr]     ... 4 more

       

      Any help would be much appreciated.

      Thanks