5 Replies Latest reply on Apr 12, 2010 8:05 AM by Wolfgang Knauf

    Jboss 5.1.0 - .ear deployment exception

    Prakash M Novice

      Hello,

      Am migrating our application to use Jboss 5.1.0 from Jboss 4.2.3.

      After the migration when I try to deploy the the displayconsole.ear file, am getting the following deployment exception.

       

      15:28:13,307 DEBUG [WebAppParsingDeployer] Error during deploy: vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole.ear/displayconsole.war/
      org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/appconsole.ear/displayconsole.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.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
          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:619)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected. @ vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/WEB-INF/web.xml[47,20]
          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.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
          at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
          ... 34 more
      Caused by: org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected. @ vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/WEB-INF/web.xml[47,20]
          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
          at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)

          ... 42 more

      15:28:13,307 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/ state=Not Installed mode=Manual requiredState=Parse
      org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.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:171)
      ....   
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
          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:619)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected. @ vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/WEB-INF/web.xml[47,20]
          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:256)
          at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
          at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
          ... 34 more
      Caused by: org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected. @ vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/WEB-INF/web.xml[47,20]
          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)
          .....

       

      This was working fine in Jboss 4.2.3, it would be helpful if anyone chip in your suggestions.

      Thanks in advance.

       

      Regards,

      Prakash

        • 1. Re: Jboss 5.1.0 - .ear deployment exception
          Wolfgang Knauf Master

          Hi,

           

          check the content of "displayconsole-2.0.0-tui.ear/displayconsole.war/WEB-INF/web.xml". Probably, the order of some elements is wrong.  You might use an IDE like Eclipse, which validates this files while building the app.

           

          JBoss 5.0 became more strict in XML validation, so this is a common upgrade problem.

           

          Best regards

           

          Wolfgang

          • 2. Re: Jboss 5.1.0 - .ear deployment exception
            Prakash M Novice

            Hi,

            Just i had a look into my web.xml and changed the tag as below

            Previous one

            <web-app 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"
                version="2.4">


            After changing

             

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

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

            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

            http://java.sun.com/xml/ns/javaee/application_5.xsd"

            version="5">

             

            After starting the server am getting the below exception

             

             

            12:49:50,611 DEBUG [WebAppParsingDeployer] Error during deploy: vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/
            org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/
                at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
                ...
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
                at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
                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:619)
            Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Element {http://java.sun.com/xml/ns/javaee}web-app is not bound as a global element.
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
                at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
                at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
                ... 34 more
            Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Element {http://java.sun.com/xml/ns/javaee}web-app is not bound as a global element.
                at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:660)
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
                ...
                at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
                ... 42 more
            12:49:50,611 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/ state=Not Installed mode=Manual requiredState=Parse
            org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/
                at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
                ...   
                at org.jboss.Main$1.run(Main.java:556)
                at java.lang.Thread.run(Thread.java:619)
            Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Element {http://java.sun.com/xml/ns/javaee}web-app is not bound as a global element.
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
               
                at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
                ... 34 more
            Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Element {http://java.sun.com/xml/ns/javaee}web-app is not bound as a global element.
                at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:660)
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
               
                ... 42 more

             

            Regards,

            Prakash

            • 3. Re: Jboss 5.1.0 - .ear deployment exception
              jaikiran pai Master

              Prakash M wrote:

               



              After changing

               

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

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

              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

              http://java.sun.com/xml/ns/javaee/application_5.xsd"

              version="5">

               

              You are using an incorrect xsd in the web.xml. Use:

              <web-app 
                       xmlns="http://java.sun.com/xml/ns/javaee" 
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
              
              • 4. Re: Jboss 5.1.0 - .ear deployment exception
                Prakash M Novice

                Thanks Jaikiran, As per your suggestion I have changed the web.xml to use correct xsd. However I got the below exception while deploying the ear file.

                 

                Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/javaee":servlet-class, "http://java.sun.com/xml/ns/javaee":jsp-file}' is expected. @ vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/WEB-INF/web.xml[46,20]
                    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:256)
                    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
                    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
                    ... 34 more
                Caused by: org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/javaee":servlet-class, "http://java.sun.com/xml/ns/javaee":jsp-file}' is expected. @ vfszip:/D:/apps/jboss-5.1.0/server/default/deploy/displayconsole-2.0.0-tui.ear/displayconsole.war/WEB-INF/web.xml[46,20]
                    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)

                 

                do you have any idea, what went wrong?

                 

                Regards,

                Prakash

                • 5. Re: Jboss 5.1.0 - .ear deployment exception
                  Wolfgang Knauf Master

                  Hi,

                   

                  there is a syntax error in your web.xml. Please use an IDE which provides you with a XML validator, e.g. Eclipse (here, you would need the packages "Eclipse  IDE for Java EE Developers").

                   

                   

                  Best regards

                   

                  Wolfgang