Failed To Parse Source Jboss

If you are getting below mentioned errors in jboss log files while starting your server and your deployment fails to get active then follow below steps to fix the issue.

 

Error:

20:17:11,490 INFO [LogNotificationListener] Adding notification listener for logging mbean “jboss.system:service=Logging,type=Log4jService” to server [email protected][ defaultDomain=’jboss’ ]
20:17:19,451 ERROR [AbstractKernelController] Error installing to Parse: name=vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/lensmall.ear/ state=PreParse mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/lensmall.ear/lensmall.war/
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:362)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)
at

org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1225)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: The content of element type “web-app” must match “(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)”. @ vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/lensmall.ear/lensmall.war/WEB-INF/web.xml[255,11]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:189)
at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:304)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:286)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:203)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
… 34 more
Caused by: org.xml.sax.SAXException: The content of element type “web-app” must match “(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)”. @ vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/lensmall.ear/lensmall.war/WEB-INF/web.xml[255,11]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
… 43 more
20:17:23,243 INFO [MailService] Mail Service bound to java:/Mail
20:17:27,235 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version – tag:JBOSSTS_4_6_1_GA_CP12) – JBoss Inc.
20:17:27,235 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
20:17:27,459 INFO [TransactionManagerService] Initializing recovery manager
20:17:27,556 INFO [TransactionManagerService] Recovery manager configured
20:17:27,556 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
20:17:27,600 INFO [TransactionManagerService] Starting transaction recovery manager
20:17:28,372 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/JBOSS/jboss-ep-5.1/native/lib64
20:17:28,561 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
20:17:28,562 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-0.0.0.0-8009
20:17:28,597 INFO [StandardService] Starting service jboss.web
20:17:28,599 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.12.GA-patch-03
20:17:29,429 INFO [Catalina] Server startup in 866 ms
20:17:29,467 INFO [TomcatDeployment] deploy, ctxPath=/web-console
20:17:30,502 INFO [TomcatDeployment] deploy, ctxPath=/jbossws
20:17:30,529 INFO [TomcatDeployment] deploy, ctxPath=/invoker
20:17:30,912 INFO [RARDeployment] Required license terms exist, view vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
20:17:30,926 INFO [RARDeployment] Required license terms exist, view vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
20:17:30,934 INFO [RARDeployment] Required license terms exist, view vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/jms-ra.rar/META-INF/ra.xml
20:17:30,946 INFO [RARDeployment] Required license terms exist, view vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/mail-ra.rar/META-INF/ra.xml
20:17:30,966 INFO [RARDeployment] Required license terms exist, view vfsfile:/opt/JBOSS/jboss-eap-5.1/jboss-as/server/all/deploy/quartz-ra.rar/META-INF/ra.xml
20:17:31,069 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
20:17:31,097 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
20:17:31,100 INFO [RAMJobStore] RAMJobStore initialized.
20:17:31,100 INFO [StdSchedulerFactory] Quartz scheduler ‘DefaultQuartzScheduler’ initialized from default resource file in Quartz package: ‘quartz.properties’
20:17:31,100 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
20:17:31,102 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
20:17:32,435 INFO [ConnectionFactoryBindingService] Bound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=DefaultDS’ to JNDI name ‘java:DefaultDS’
20:17:33,050 INFO [ServerPeer] JBoss Messaging 1.4.8.SP5 server [0] started
20:17:33,179 INFO [ConnectionFactory] Connector bisocket://kart00912.lensmall.com:4457 has leasing enabled, lease period 10000 milliseconds
20:17:33,180 INFO [ConnectionFactory] [email protected] started
20:17:33,195 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
20:17:33,196 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
20:17:33,197 INFO [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
20:17:33,197 INFO [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
20:17:33,199 INFO [ConnectionFactory] Connector bisocket://kart00912.lensmall.com:4457 has leasing enabled, lease period 10000 milliseconds
20:17:33,199 INFO [ConnectionFactory] [email protected] started
20:17:33,200 INFO [ConnectionFactory] Connector bisocket://kart00912.lensmall.com:4457 has leasing enabled, lease period 10000 milliseconds
20:17:33,200 INFO [ConnectionFactory] [email protected]8 started
20:17:33,414 INFO [ConnectionFactoryBindingService] Bound ConnectionManager ‘jboss.jca:service=ConnectionFactoryBinding,name=JmsXA’ to JNDI name ‘java:JmsXA’
20:17:33,735 INFO [TomcatDeployment] deploy, ctxPath=/admin-console
May 16, 2014 8:17:33 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra (1.2_13-b01-FCS) for context ‘/admin-console’
20:17:33,845 INFO [config] Initializing Mojarra (1.2_13-b01-FCS) for context ‘/admin-console’

 

Solution:

Here the error itself has the solution to the problem. This issue is caused due to the unstructured web.xml file configurations. You shall build the tags in xml file in below order from top to bottom.

icon?-->>display-name?-->>description?-->>distributable?-->>context-param*-->>filter*-->>filter-mapping*-->>listener*-->>servlet*-->>servlet-mapping*-->>session-config?-->>mime-mapping*-->>welcome-file-list?-->>error-page*-->>taglib*-->>resource-env-ref*-->>resource-ref*-->>security-constraint*-->>login-config?-->>security-role*-->>env-entry*-->>ejb-ref*-->>ejb-local-ref*

Once you have rearranged the tags in proper order as above , please restart the Jboss service and check.

In case of any ┬ęCopyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply