3 Replies Latest reply on Jan 29, 2014 2:18 AM by Wolf-Dieter Fink

    Unexpected element {urn:jboss:domain:mail:1.0}subsystem

    kushal aswani Newbie

      Hi,

       

      I am trying to set up a mail service configuration, but I am getting this error

       

      11:53:46,322 ERROR [org.jboss.as.server] JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration

              at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              at org.jboss.as.server.ServerService.boot(ServerService.java:275) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:156) [jboss-as-controller-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[257,9]

      Message: Unexpected element '{urn:jboss:domain:mail:1.0}subsystem'

              at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108) [staxmapper-1.1.0.Final-redhat-2.jar:1.1.0.Final-redhat-2]

              at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.1.0.Final-redhat-2.jar:1.1.0.Final-redhat-2]

              at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:905) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_1(StandaloneXml.java:331) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:127) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:99) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final-redhat-2.jar:1.1.0.Final-redhat-2]

              at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final-redhat-2.jar:1.1.0.Final-redhat-2]

              at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

              ... 3 more

       

      11:53:46,369 FATAL [org.jboss.as.server] JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

      11:53:46,389 INFO  [org.jboss.as] JBAS015950: JBoss EAP 6.0.1.GA (AS 7.1.3.Final-redhat-4) stopped in 10ms

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

       

       

      standalone.xml

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

      ...

      ...

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

                  <mail-session jndi-name="java:jboss/mail/Default">

                      <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                  </mail-session>

        </subsystem>

      ...

      ...

        <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

      ...

      ...

             <outbound-socket-binding name="mail-smtp">
                  <remote-destination host="localhost" port="25"/>
              </outbound-socket-binding>
      </socket-binding-group>

       

       

      Any help would be much appreciated.

      Thanks.

        • 1. Re: Unexpected element {urn:jboss:domain:mail:1.0}subsystem
          Tomaz Cerar Master

          Hi,

           

          do you have <extension module="org.jboss.as.mail"/> present under <extensions> on top of standalone.xml?

          • 2. Re: Unexpected element {urn:jboss:domain:mail:1.0}subsystem
            kushal aswani Newbie

            Hello Tomaz,

             

            Thanks for the help, it worked but later when executing I got another exception.

             

            13:13:52,678 INFO  [stdout] (http-/127.0.0.1:8080-5) Caused by: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;

            13:13:52,680 INFO  [stdout] (http-/127.0.0.1:8080-5)   nested exception is:

            13:13:52,683 INFO  [stdout] (http-/127.0.0.1:8080-5)    java.net.ConnectException: Connection refused: connect

            13:13:52,685 INFO  [stdout] (http-/127.0.0.1:8080-5)    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)

            13:13:52,688 INFO  [stdout] (http-/127.0.0.1:8080-5)    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)

            13:13:52,692 INFO  [stdout] (http-/127.0.0.1:8080-5)    at javax.mail.Service.connect(Service.java:295)

            13:13:52,694 INFO  [stdout] (http-/127.0.0.1:8080-5)    at javax.mail.Service.connect(Service.java:176)

            13:13:52,696 INFO  [stdout] (http-/127.0.0.1:8080-5)    at javax.mail.Service.connect(Service.java:125)

            13:13:52,698 INFO  [stdout] (http-/127.0.0.1:8080-5)    at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:167)

            13:13:52,701 INFO  [stdout] (http-/127.0.0.1:8080-5)    ... 68 more

            13:13:52,703 INFO  [stdout] (http-/127.0.0.1:8080-5) Caused by: java.net.ConnectException: Connection refused: connect

            13:13:52,706 INFO  [stdout] (http-/127.0.0.1:8080-5)    at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)

            13:13:52,709 INFO  [stdout] (http-/127.0.0.1:8080-5)    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

            13:13:52,712 INFO  [stdout] (http-/127.0.0.1:8080-5)    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

            13:13:52,714 INFO  [stdout] (http-/127.0.0.1:8080-5)    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

            13:13:52,717 INFO  [stdout] (http-/127.0.0.1:8080-5)    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)

            13:13:52,718 INFO  [stdout] (http-/127.0.0.1:8080-5)    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

            13:13:52,721 INFO  [stdout] (http-/127.0.0.1:8080-5)    at java.net.Socket.connect(Socket.java:579)

            13:13:52,723 INFO  [stdout] (http-/127.0.0.1:8080-5)    at java.net.Socket.connect(Socket.java:528)

            13:13:52,725 INFO  [stdout] (http-/127.0.0.1:8080-5)    at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288)

            13:13:52,727 INFO  [stdout] (http-/127.0.0.1:8080-5)    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)

            13:13:52,731 INFO  [stdout] (http-/127.0.0.1:8080-5)    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)

            13:13:52,733 INFO  [stdout] (http-/127.0.0.1:8080-5)    ... 73 more

             

            Thanks again for the help.

            -Kushal

            • 3. Re: Unexpected element {urn:jboss:domain:mail:1.0}subsystem
              Wolf-Dieter Fink Master

              That looks like you have no service running and bound to localhost. Maybe the correct host-IP is used or the SMTP service is running on a different machine

              1 of 1 people found this helpful