-
Bug
-
Resolution: Done
-
Major
-
7.0.1.Final
-
None
When creating a jboss-deployment-structure.xml if a resource-root is added with the 'filter' element. A parsing error occurs. It looks like it has to do with a missing 'break' in DeploymentStructureDescriptorParser at the case statement on line 895 (XMLStreamConstants.START_ELEMENT). The lack of a break statement here would always cause an exception to be thrown in the presence of a 'filter' element.
EX:
<resource-root path="lib">
<filter>
<include path="/**" />
</filter>
</resource-root>
The resulting exception is:
16:20:34,755 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."myEar.ear".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myEar.ear".PARSE: Failed to process phase PARSE of deployment "myEar.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Error loading jboss-structure.xml from C:\servers\jboss-as-7.0.1.Final\standalone\tmp\vfs\temp6da2fecd4aea20e0\myEar.ear-4b5e7025d8eaa324\contents\META-INF\jboss-deployment-structure.xml
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:402)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:375)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.deploy(DeploymentStructureDescriptorParser.java:289)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[40,5]
Message: Unexpected content of type 'element end' named 'filter'
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.unexpectedContent(DeploymentStructureDescriptorParser.java:483)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseResourceRoot(DeploymentStructureDescriptorParser.java:909)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseResources(DeploymentStructureDescriptorParser.java:827)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseModuleStructureSpec(DeploymentStructureDescriptorParser.java:686)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseModule(DeploymentStructureDescriptorParser.java:660)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseStructureContents(DeploymentStructureDescriptorParser.java:581)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseDocument(DeploymentStructureDescriptorParser.java:510)
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:396)
... 8 more