aspose file tools*
The moose likes JBoss/WildFly and the fly likes Parse exception in ejb-jar.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Parse exception in ejb-jar.xml " Watch "Parse exception in ejb-jar.xml " New topic
Author

Parse exception in ejb-jar.xml

Tanmaya Kamal
Greenhorn

Joined: Mar 19, 2012
Posts: 5
I am facing parse exception in ejb-jar.xml. Few tags are not parsed by jboss7.1 though they are as per the DTDs like ‘message-selector’ and ‘message-driven-destination’

ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."backoffice.ear"."currency-ejb.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."backoffice.ear"."currency-ejb.jar".PARSE: Failed to process phase PARSE of subdeployment "currency-ejb.jar" of deployment "backoffice.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_01]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_01]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Exception while parsing ejb-jar.xml: /D:/jboss7.1.0/jboss-as-7.1.0.Final/bin/content/backoffice.ear/currency-ejb.jar/META-INF/ejb-jar.xml
at org.jboss.as.ejb3.deployment.processors.EjbJarParsingDeploymentUnitProcessor.parseEjbJarXml(EjbJarParsingDeploymentUnitProcessor.java:248)
at org.jboss.as.ejb3.deployment.processors.EjbJarParsingDeploymentUnitProcessor.deploy(EjbJarParsingDeploymentUnitProcessor.java:118)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[71,13]
Message: Unexpected element 'message-selector' encountered
at org.jboss.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:108)
at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElement(AbstractMetaDataParser.java:53)
at org.jboss.metadata.ejb.parser.spec.AbstractNamedMetaDataWithDescriptionGroupParser.processElement(AbstractNamedMetaDataWithDescriptionGroupParser.java:66)
at org.jboss.metadata.ejb.parser.spec.AbstractEnterpriseBeanMetaDataParser.processElement(AbstractEnterpriseBeanMetaDataParser.java:84)
at org.jboss.metadata.ejb.parser.spec.AbstractMessageDrivenBeanParser.processElement(AbstractMessageDrivenBeanParser.java:93)
at org.jboss.metadata.ejb.parser.spec.MessageDrivenBean31Parser.processElement(MessageDrivenBean31Parser.java:76)
at org.jboss.metadata.ejb.parser.spec.MessageDrivenBean31Parser.processElement(MessageDrivenBean31Parser.java:36)
at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:65)
at org.jboss.metadata.ejb.parser.spec.MessageDrivenBean31Parser.parse(MessageDrivenBean31Parser.java:43)
at org.jboss.metadata.ejb.parser.spec.EnterpriseBeansMetaDataParser.processElement(EnterpriseBeansMetaDataParser.java:98)
at org.jboss.metadata.ejb.parser.spec.EnterpriseBeansMetaDataParser.processElement(EnterpriseBeansMetaDataParser.java:38)
at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:65)
at org.jboss.metadata.ejb.parser.spec.EnterpriseBeansMetaDataParser.parse(EnterpriseBeansMetaDataParser.java:74)
at org.jboss.metadata.ejb.parser.spec.EnterpriseBeansMetaDataParser.parse(EnterpriseBeansMetaDataParser.java:66)
at org.jboss.metadata.ejb.parser.spec.AbstractEjbJarMetaDataParser.processElement(AbstractEjbJarMetaDataParser.java:111)
at org.jboss.metadata.ejb.parser.spec.AbstractEjbJarMetaDataParser.processElement(AbstractEjbJarMetaDataParser.java:38)
at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:65)
at org.jboss.metadata.ejb.parser.spec.EjbJarMetaDataParser.parseDocument(EjbJarMetaDataParser.java:109)
at org.jboss.metadata.ejb.parser.spec.EjbJarMetaDataParser.parse(EjbJarMetaDataParser.java:53)
at org.jboss.as.ejb3.deployment.processors.EjbJarParsingDeploymentUnitProcessor.parseEjbJarXml(EjbJarParsingDeploymentUnitProcessor.java:245)
... 7 more


The content of ejb-jar.xml is al follows:



Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Looks like a bug in the parser. I checked the DTD in the header, and the copy that ships with AS 7.1, and both agree that message-selector is valid where you have it at line 71. Even Eclipse didn't complain about it. You might have to issue a bug report in JIRA: https://issues.jboss.org/secure/Dashboard.jspa


JBoss In Action
 
 
subject: Parse exception in ejb-jar.xml