ParseError <tracking-mode> element for the shared-session-config of META-INF/jboss-all.xml
Issue
- We refer Can JBoss be configured to share sessions across multiple web applications? and Red Hat JBoss EAP 7.0 Development Guide - 3.7.4. Configuring Session Sharing between Subdeployments in Enterprise Archives to configure session sharing WAR module subdeployments contained in an EAR.
- The development guide provides the example META-INF/jboss-all.xml
- 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>
- However, we failed to deploy by the "Example: META-INF/jboss-all.xml" with XML parsing error as 'urn:jboss:shared-session-config:1.0 tracking-mode'.
- There is an error for <tracking-mode> element as below and also 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
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.0.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.