5 Replies Latest reply on Dec 12, 2014 10:50 AM by span7152

    JBoss-eap-6.1 standalone deployments for SAR file throws “: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)”

    span7152 Newbie

      Hi,

         I am having this issue when deploying a SAR file either in "C:\JBossEXP\jboss-eap-6.1\standalone\deployments" or in "JBoss' ENTERPRISE APPLICATION PLATFORM 6.1.0.GA". Please see the following attached error message.

      Could anybody give some instructions?

       

       

        "JBAS014671: Failed services" => {"jboss.deployment.unit.\"backEnd.sar\".PARSE"

      10:32:55,783 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: F
      ailed to start service jboss.deployment.unit."backEnd.sar".PARSE: org.jboss.msc.servic
      e.StartException in service jboss.deployment.unit."backEnd.sar".PARSE: JBAS018733: Fai
      led to process phase PARSE of deployment "backEnd.sar"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deployment
      UnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redh
      at-8]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Service
      ControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControlle
      rImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
      1145) [rt.jar:1.7.0_67]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java
      :615) [rt.jar:1.7.0_67]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS0172
      24: Failed to parse service xml ["/C:/JBossEXP/jboss-eap-6.1/bin/content/backEnd.sar/M
      ETA-INF/jboss-service.xml"]
        at org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeplo
      ymentParsingProcessor.java:102)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deployment
      UnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redh
      at-8]
        ... 5 more
      Caused by: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)
        at com.ctc.wstx.sr.BasicStreamReader.throwNotTextual(BasicStreamReader.java:5
      510)
        at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:855)
        at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.getText(XMLExtendedStream
      ReaderImpl.java:275)
        at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.unexpected
      Content(JBossServiceXmlDescriptorParser.java:629)
        at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.parseMBean
      (JBossServiceXmlDescriptorParser.java:219)
        at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.readElemen
      t(JBossServiceXmlDescriptorParser.java:190)
        at org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.readElemen
      t(JBossServiceXmlDescriptorParser.java:47)
        at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
        at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
        at org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeplo
      ymentParsingProcessor.java:95)
        ... 6 more

      10:32:55,798 ERROR [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS0158
      70: Deploy of deployment "backEnd.sar" was rolled back with the following failure mess
      age:
      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"backEnd.sar\".PARSE" => "o
      rg.jboss.msc.service.StartException in service jboss.deployment.unit.\"backEnd.sar\".P
      ARSE: JBAS018733: Failed to process phase PARSE of deployment \"backEnd.sar\"
        Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS
      017224: Failed to parse service xml [\"/C:/JBossEXP/jboss-eap-6.1/bin/content/dapmis.
      sar/META-INF/jboss-service.xml\"]
        Caused by: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)"}
      }
      10:32:55,814 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS0158
      77: Stopped deployment backEnd.sar (runtime-name: backEnd.sar) in 7ms

       

       

      Thanks,

      Sam

        • 1. Re: JBoss-eap-6.1 standalone deployments for SAR file throws “: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)”
          Jay SenSharma Master

          Sam,

           

            Can you please paste your SAR's  "dapmis.sar/META-INF/jboss-service.xml" file it . Looks like there is some white space causing issue. Or are you using the latest schema declaration ...for example like following:

           

          <?xml version="1.0" encoding="UTF-8"?>
          <server xmlns="urn:jboss:service:7.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
              <mbean code="mbean.TestService" name="server.monitor:service=TestService">
                   <attribute name="timer">5000</attribute>
              </mbean>
          </server>
          
          

           

           

           

          If you are using "java:properties"  inside your jboss-service.xml file then your issue might be related to:   [WFLY-1189] java:properties element in SAR deployments are no longer supported - JBoss Issue Tracker

          • 2. Re: JBoss-eap-6.1 standalone deployments for SAR file throws “: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)”
            span7152 Newbie

            Jay,

             

               I added xmlns and Timer as you posted but got the same error. Some information are listed as follows:

            1. jdk1.7.0_67

            2.  Under "C:/JBossEXP/jboss-eap-6.1/bin/" directory, it has no
            "content/backEnd.sar/META-INF/jboss-service.xml" sub directory
            but don't know why it shows in the output error message.

            3. I am using backEnd.sar for testing.

            4. Deploy in Application Platform.

            5. It used to be working in JBoss-5.0.1-GA and 2 services deployed successfully in JMX-console.

                The JMX-console is no more for JBoss above eap 6.1.

             

               

            <?xml version="1.0" encoding="UTF-8" ?>

            <server xmlns="urn:jboss:service:7.0"

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

            xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">

                <mbean code="com.BackEnd.server.BackEndServer"

                        name="BackEnd:service=BackEndServer"

                        xmbean-dd="META-INF/BackEndServer.xml">

                    <depends>jboss.jca:name=BackEnd,service=ManagedConnectionPool</depends>

                    <depends>jboss.jca:name=JmsXA,service=ConnectionFactoryBinding</depends>

                    <depends>jboss.mq.destination:name=ImageUploadQueue,service=Queue</depends>

                    <attribute name="timer">5000</attribute>

                </mbean>

              

                <mbean code="com.BackEnd.server.RRServer"

                        name="BackEnd:service=RRServer"

                        xmbean-dd="META-INF/RRServer.xml">

                    <depends>jboss.jca:name=BackEnd,service=ManagedConnectionPool</depends>

                    <depends>jboss.jca:name=JmsXA,service=ConnectionFactoryBinding</depends>

                    <depends>jboss.mq.destination:name=RRTopic,service=Topic</depends>

                    <attribute name="timer">5000</attribute>

                </mbean>

            </server>

             

             

            Thanks,

            Sam

            • 3. Re: JBoss-eap-6.1 standalone deployments for SAR file throws “: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)”
              Jay SenSharma Master

              Sam,

               

                          You are using "xmbean-dd="META-INF/RRServer.xml"  which is not going to work as it is in JBoss EAP6.   The jboss-service.xml  schema is changed. Please check:   "jboss-eap-6.1.0/docs/schema/jboss-service_7_0.xsd"

               

                          In  your case the usage of   "xmbean-dd="META-INF/RRServer.xml"     is causing the  [java.lang.IllegalStateException: Not a textual event (START_ELEMENT)]  error.     The ""xmbean-dd"  is an invalid element according to the XSD.

               

                            Also EAP6  supports EE6.  EE6 offers @Singleton to define the MBeans which is more generic/standard/recommended approach for defining the MBeans and the Dependencies will also work as desired.

              • 4. Re: JBoss-eap-6.1 standalone deployments for SAR file throws “: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)”
                span7152 Newbie

                Hi, Jay,

                 

                   (1) Changed to EE6 but didn't get a big impact.

                   (2) After removed 2 "xmbean-dd" from jboss-service.xml, got the following new error message.

                Even manually put "log4j.xml" into "META-INF" of "sar" file, it doesn't help.

                 

                 

                13:32:46,481 ERROR [backEnd] (MSC service thread 1-2) com.backEnd.util.Log

                Utility <static> Unable to load log configuration, using default configuration

                13:32:46,496 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: F

                ailed to start service jboss.deployment.unit."backEnd.sar".INSTALL: org.jboss.msc.serv

                1. ice.StartException in service jboss.deployment.unit."backEnd.sar".INSTALL: JBAS018733:

                Failed to process phase INSTALL of deployment "backEnd.sar"

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deployment

                1. UnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redh

                at-8]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Service

                1. ControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControlle

                1. rImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

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

                1145) [rt.jar:1.7.0_67]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java

                :615) [rt.jar:1.7.0_67]

                        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]

                Caused by: java.lang.IllegalStateException: JBAS017228: Set method for property 'time

                r' not found for: com.backEnd.server.BackEndServer

                        at org.jboss.as.service.ReflectionUtils.getSetter(ReflectionUtils.java:85)

                        at org.jboss.as.service.ParsedServiceDeploymentProcessor.getValue(ParsedServi

                1. ceDeploymentProcessor.java:186)

                        at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedSe

                1. rviceDeploymentProcessor.java:143)

                        at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedService

                1. DeploymentProcessor.java:103)

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deployment

                1. UnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redh

                at-8]

                        ... 5 more

                 

                13:32:46,496 ERROR [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS0158

                70: Deploy of deployment "backEnd.sar" was rolled back with the following failure mess

                age:

                {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"backEnd.sar\".INSTALL" =>

                "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"backEnd.sar\"

                .INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"backEnd.sar\"

                    Caused by: java.lang.IllegalStateException: JBAS017228: Set method for property '

                timer' not found for: com.backEnd.server.BackEndServer"}}

                13:32:46,512 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS0158

                77: Stopped deployment backEnd.sar (runtime-name: backEnd.sar) in 9ms                                     

                 

                 

                Thanks,

                Sam

                • 5. Re: JBoss-eap-6.1 standalone deployments for SAR file throws “: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)”
                  span7152 Newbie

                  Hi, Jay,

                   

                      I removed "<attribute name="timer">5000</attribute>" then tested again. Found that it seems moved one step forward. Please see the following error message which shows ".create" and ".start" missing in <mbean>.

                  Do you need to put more <depends> or <attribute> in jboss-service.xml from jboss-eap6.1 above?

                   

                   

                  ERROR [backEnd] (MSC service thread 1-2) com.backEnd.util.Log
                  Utility <static> Unable to load log configuration, using default configuration

                  14:42:57,569 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS0158

                  77: Stopped deployment : backEnd.sar (runtime-name: backEnd.sar) in 6ms

                  14:42:57,572 ERROR [org.jboss.as.server] (HttpManagementService-threads - 6) JBAS0158

                  70: Deploy of deployment "backEnd.sar" was rolled back with the following failure mess

                  age:

                  {"JBAS014771: Services with missing/unavailable dependencies" => [

                      "jboss.mbean.service.BackEnd:service=RRServer.start is missing [jboss.mbean.servi

                  1. ce.\"jboss.jca:name=JmsXA,service=ConnectionFactoryBinding\".start, jboss.mbean.servi
                  2. ce.\"jboss.jca:name=backEnd,service=ManagedConnectionPool\".start, jboss.mbean.service

                  .\"jboss.mq.destination:name=RRTopic,service=Topic\".start]",

                      "jboss.mbean.service.BackEnd:service=RRServer.create is missing [jboss.mbean.serv

                  1. ice.\"jboss.mq.destination:name=RRTopic,service=Topic\".create, jboss.mbean.service.

                  \"jboss.jca:name=JmsXA,service=ConnectionFactoryBinding\".create, jboss.mbean.service

                  .\"jboss.jca:name=backEnd,service=ManagedConnectionPool\".create]",

                      "jboss.mbean.service.BackEnd:service=BackEndServer.create is missing [jboss.mbean.s

                  1. ervice.\"jboss.jca:name=JmsXA,service=ConnectionFactoryBinding\".create, jboss.mbean.
                  2. service.\"jboss.mq.destination:name=ImageUploadQueue,service=Queue\".create, jboss.mb
                  3. ean.service.\"jboss.jca:name=backEnd,service=ManagedConnectionPool\".create]",

                      "jboss.mbean.service.BackEnd:service=BackEndServer.start is missing [jboss.mbean.se

                  1. rvice.\"jboss.jca:name=JmsXA,service=ConnectionFactoryBinding\".start, jboss.mbean.se
                  2. rvice.\"jboss.jca:name=backEnd,service=ManagedConnectionPool\".start, jboss.mbean.serv
                  3. ice.\"jboss.mq.destination:name=ImageUploadQueue,service=Queue\".start]"

                  ]}

                   

                   

                  Thanks,

                  Sam