Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-13098

ParseError <tracking-mode> element for the shared-session-config of META-INF/jboss-all.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.0.7.GA
    • Undertow
    • None
    • Hide

      It can be reproduced with the attached ear on the JBoss EAP 7.

      Show
      It can be reproduced with the attached ear on the JBoss EAP 7.

      There is an deployment failure with XML parsing error as 'urn:jboss:shared-session-config:1.0 tracking-mode' for session sharing in an EAR on the JBoss EAP 7.
      There is an example of META-INF/jboss-all.xml in JBoss EAP 7 development guide as below. However it can't be deployed.

      • 3.7.4.1. REFERENCE OF SHARED SESSION CONFIG OPTIONS
        • Example: META-INF/jboss-all.xml
          <jboss umlns="urn:jboss:1.0">
            <shared-session-config xmlns="urn:jboss:shared-session-config:1.0">
              <max-active-sessions>10</max-active-sessions>
              <session-config>
                <session-timeout>0</session-timeout>
                <cookie-config>
                  <name>JSESSIONID</name>
                  <domain>domainName</domain>
                  <path>/cookiePath</path>
                  <comment>cookie comment</comment>
                  <http-only>true</http-only>
                  <secure>true</secure>
                  <max-age>-1</max-age>
                </cookie-config>
              </session-config>
              <tracking-mode>COOKIE</tracking-mode>
            </shared-session-config>
            <replication-config>
              <cache-name>web</cache-name>
              <replication-granularity>SESSION</replication-granularity>
            </replication-config>
          </jboss>
          

      There is an error for <tracking-mode> element as below and if it removed, there is an error for <replication-config> element:

      16:08:34,706 INFO  [org.jboss.as.repository] (External Management Request Threads -- 1) WFLYDR0001: Content added at location /Users/tedwon/Downloads/jboss-eap-7.0.7/standalone/data/content/d7/9cf283d45974f6125da2e8211da5c139e57f4c/content
      16:08:34,719 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "session-sharing-ear.ear" (runtime-name: "session-sharing-ear.ear")
      16:08:34,737 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."session-sharing-ear.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."session-sharing-ear.ear".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "session-sharing-ear.ear"
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0194: Error loading jboss-all.xml from /Users/tedwon/Downloads/jboss-eap-7.0.7/standalone/tmp/vfs/temp/tempa6d97f8d0becb100/content-c4b82e9142e6df2f/contents/META-INF/jboss-all.xml
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLParsingProcessor.parse(JBossAllXMLParsingProcessor.java:153)
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLParsingProcessor.parse(JBossAllXMLParsingProcessor.java:128)
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLParsingProcessor.deploy(JBossAllXMLParsingProcessor.java:96)
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
      	... 5 more
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[16,9]
      Message: WFLYCTL0198: Unexpected element '{urn:jboss:shared-session-config:1.0}tracking-mode' encountered
      	at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:89)
      	at org.wildfly.extension.undertow.session.SharedSessionConfigParser_1_0.readElement(SharedSessionConfigParser_1_0.java:150)
      	at org.wildfly.extension.undertow.session.SharedSessionConfigParser_1_0.parse(SharedSessionConfigParser_1_0.java:65)
      	at org.wildfly.extension.undertow.session.SharedSessionConfigParser_1_0.parse(SharedSessionConfigParser_1_0.java:49)
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLElementReader.readElement(JBossAllXMLElementReader.java:51)
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLElementReader.readElement(JBossAllXMLElementReader.java:39)
      	at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
      	at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLParsingProcessor$Parser.parseJBossElement(JBossAllXMLParsingProcessor.java:203)
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLParsingProcessor$Parser.readElement(JBossAllXMLParsingProcessor.java:192)
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLParsingProcessor$Parser.readElement(JBossAllXMLParsingProcessor.java:176)
      	at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
      	at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
      	at org.jboss.as.server.deployment.jbossallxml.JBossAllXMLParsingProcessor.parse(JBossAllXMLParsingProcessor.java:148)
      	... 8 more
      
      16:08:34,739 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "session-sharing-ear.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"session-sharing-ear.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"session-sharing-ear.ear\".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment \"session-sharing-ear.ear\"
          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0194: Error loading jboss-all.xml from /Users/tedwon/Downloads/jboss-eap-7.0.7/standalone/tmp/vfs/temp/tempa6d97f8d0becb100/content-c4b82e9142e6df2f/contents/META-INF/jboss-all.xml
          Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[16,9]
      Message: WFLYCTL0198: Unexpected element '{urn:jboss:shared-session-config:1.0}tracking-mode' encountered"}}
      16:08:34,741 ERROR [org.jboss.as.server] (External Management Request Threads -- 1) WFLYSRV0021: Deploy of deployment "session-sharing-ear.ear" was rolled back with the following failure message: 
      {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"session-sharing-ear.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"session-sharing-ear.ear\".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment \"session-sharing-ear.ear\"
          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0194: Error loading jboss-all.xml from /Users/tedwon/Downloads/jboss-eap-7.0.7/standalone/tmp/vfs/temp/tempa6d97f8d0becb100/content-c4b82e9142e6df2f/contents/META-INF/jboss-all.xml
          Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[16,9]
      Message: WFLYCTL0198: Unexpected element '{urn:jboss:shared-session-config:1.0}tracking-mode' encountered"}}
      16:08:34,750 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment session-sharing-ear.ear (runtime-name: session-sharing-ear.ear) in 6ms
      16:08:34,750 INFO  [org.jboss.as.controller] (External Management Request Threads -- 1) WFLYCTL0183: Service status report
      WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."session-sharing-ear.ear".STRUCTURE
      

      With my investigation, there is shared-session-config_1_0.xsd [2] schema for definition and SharedSessionConfigParser_1_0.java [3] class for parsing. However, there is structure mismatch for <replication-config> element and missing for <tracking-mode> element in the parsing class.

      [1] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/development_guide/class_loading_and_modules#configuring_session_sharing_between_subdeployments_in_enterprise_archives
      [2] https://github.com/wildfly/wildfly/blob/master/undertow/src/main/resources/schema/shared-session-config_1_0.xsd
      [3] https://github.com/wildfly/wildfly/blob/master/undertow/src/main/java/org/wildfly/extension/undertow/session/SharedSessionConfigParser_1_0.java

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              rhn-support-jwon Ted Won
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: