2 Replies Latest reply on Jul 28, 2011 6:30 PM by rhinmass

    ParseError on WEB-INF/web.xml, taglib element

    rhinmass Newbie

      I am working on migrating a large 4.0.5.GA webapplication to AS 7.

       

      Currently I am getting a Parse error on the <taglib> element in my web.xml.

       

      Here is the full error:

       

      10:55:44,051 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."webapp.war".PARSE: org.jboss.msc.service.StartException in s

              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_21]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]

              at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to parse "/c:/jboss/jboss-as-7.1.0.Alpha1-SNAPSHOT/standalone/deployments/webapp.war/WEB-INF/web.xml"

              at org.jboss.as.web.deployment.WebParsingDeploymentProcessor.deploy(WebParsingDeploymentProcessor.java:67)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

              ... 5 more

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[164,2]

      Message: Unexpected element '{http://java.sun.com/xml/ns/j2ee}taglib' encountered

              at org.jboss.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:109)

              at org.jboss.metadata.parser.servlet.WebMetaDataParser.parse(WebMetaDataParser.java:204)

              at org.jboss.metadata.parser.servlet.WebMetaDataParser.parse(WebMetaDataParser.java:53)

              at org.jboss.as.web.deployment.WebParsingDeploymentProcessor.deploy(WebParsingDeploymentProcessor.java:65)

              ... 6 more

       

      10:55:44,051 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "webapp.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"webapp.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"webapp.war\".PARSE: Failed to process phase PARSE of deployment \"webapp.war\""}}

      10:55:44,051 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) Service status report

        Services which failed to start:

            service jboss.deployment.unit."webapp.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."webapp.war".PARSE: Failed to process phase PARSE of deployment "webapp.war"

       

      10:55:44,051 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"webapp.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"webapp.war\".PARSE: Failed to process phase PARSE of deployment \"webapp.war\""}}}}

      10:55:44,348 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment webapp.war in 299ms

       

      web.xml looks like:

       

      <?xml version="1.0" encoding="UTF-8"?>

       

      <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

      ...

       

      <taglib>                       <---- line 64

          <taglib-uri>/tags/struts-tiles</taglib-uri>

          <taglib-location>

              /WEB-INF/tags/struts/struts-tiles.tld

          </taglib-location>

      </taglib>

      <taglib>

          <taglib-uri>/tags/struts-bean</taglib-uri>

          <taglib-location>

              /WEB-INF/tags/struts/struts-bean.tld

          </taglib-location>

      </taglib>

      ... more taglib elements ...

       

      Any ideas why the taglib element is now a problem in web.xml ? 

       

      TIA for any help !