Web application deployment fails with a SAXException in JBoss EAP

Solution Unverified - Updated -

Issue

  • The web application fails to deploy with the following exception message:-

    ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Parse: name=vfszip:/home/jboss-ewp-5.1/jboss-as-web/server/someServer/deploy/test.war/ state=PreParse mode=Manual requiredState=Parse
    
    org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/home/jboss-ewp-5.1/jboss-as-web/server/someServer/deploy/test.war/
        at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
        at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:362)
        .......
        .......
    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*)". @ vfszip:/home/jboss-ewp-5.1/jboss-as-web/server/someServer/deploy/test.war/WEB-INF/web.xml[100,12]
    
        at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
        at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
    
  • The web.xml file contains the following entries:-

    <?xml version="1.0"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
         <servlet>
            <servlet-name>FooServlet</servlet-name>
            <display-name>FooServlet</display-name>
            <description>FooServlet</description>
            <servlet-class>org.jboss.sample.FooServlet</servlet-class>
         </servlet>
         <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
        <error-page>
           <error-code>404</error-code>
           <location>/error.jsp</location>
       </error-page>
       <session-config>
          <session-timeout>60</session-timeout>
       </session-config>
     </web-app>
    

Environment

  • JBoss Enterprise Application Platform (EAP) 4.3.x
  • JBoss Enterprise Application Platform (EAP) 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.