4 Replies Latest reply on Nov 21, 2011 6:18 AM by Basil George

    could not deploy .ear in Jboss 5.1.0 GA- jdk 1.6

    Basil George Newbie

      Hi All,

       

      Our team had decided to Migrate from Jboss 3.X(which used JDK 1.3) to Higher Version, so we have decided to Go with Jboss 5.1.0 GA(JDK 1.6).

       

      Note we are using EJB 1.0 in our application is this migration possible.

       

      Using Ant we could build the .ear file but when i started the server i get Exception as below:

       

      16:26:14,464 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/C:/Documents%20and%20Settings/E3003319/Desktop/JBoss/jboss-5.1.0.GA/server/default/deploy/WebCSR.ear/ state=Not Installed mode=Manual requiredState=Parse

      org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/C:/Documents%20and%20Settings/E3003319/Desktop/JBoss/jboss-5.1.0.GA/server/default/deploy/WebCSR.ear/sanchez.jar/

              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.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

              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:361)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

              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/ejb-jar_2_1.xsd}ejb-jar is not bound as a global element.

              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.jboss.xb.binding.JBossXBRuntimeException: Element {http://java.sun.com/xml/ns/javaee/ejb-jar_2_1.xsd}ejb-jar 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.parsers.AbstractSAXParser.startElement(Unknown Source)

              at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)

              at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)

              at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

              at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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)

              ... 42 more

      16:26:18,120 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@13001589{vfsfile:/C:/Documents%20and%20Settings/E3003319/Desktop/JBoss/jboss-5.1.0.GA/server/default/deploy/profileservice-secured.jar/}

        • 1. Re: could not deploy .ear in Jboss 5.1.0 GA- jdk 1.6
          Wolf-Dieter Fink Master

          It looks like that the deployment descriptor is validated against the ejb-jar 2.1 version.

          You might add the correct reference to your ejb-jar.

           

          This is because the JBoss5 validates more than earlier versions. This can be harder if the version jump is bigger

          1 of 1 people found this helpful
          • 2. Re: could not deploy .ear in Jboss 5.1.0 GA- jdk 1.6
            Basil George Newbie

            Wolf,

             

            please find my ejb-jar.xml below, as am new to ejb, please suggest what can be done.

             

                  

            <?xml version="1.0" encoding="UTF-8"?>
            <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/javaee/ejb-jar_2_1.xsd"
            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/ejb-jar_2_1.xsd">

            <display-name>Sanchez</display-name>
            <enterprise-beans>
              <session>
               <ejb-name>UTL_NonSession</ejb-name>
               <home>com.sanchez.ejb.ScUTL_NonSessionHome</home>
               <remote>com.sanchez.ejb.ScUTL_NonSession</remote>
               <ejb-class>com.sanchez.ejb.ScUTL_NonSessionEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>UserTables</ejb-name>
               <home>com.sanchez.ejb.ScUserTablesHome</home>
               <remote>com.sanchez.ejb.ScUserTables</remote>
               <ejb-class>com.sanchez.ejb.ScUserTablesEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>BillPay</ejb-name>
               <home>com.sanchez.ejb.ScBillPayHome</home>
               <remote>com.sanchez.ejb.ScBillPay</remote>
               <ejb-class>com.sanchez.ejb.ScBillPayEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>UserData</ejb-name>
               <home>com.sanchez.ejb.ScUserDataHome</home>
               <remote>com.sanchez.ejb.ScUserData</remote>
               <ejb-class>com.sanchez.ejb.ScUserDataEjb</ejb-class>
               <session-type>Stateful</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>Correspondence</ejb-name>
               <home>com.sanchez.ejb.ScCorrespondenceHome</home>
               <remote>com.sanchez.ejb.ScCorrespondence</remote>
               <ejb-class>com.sanchez.ejb.ScCorrespondenceEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>SysTables</ejb-name>
               <home>com.sanchez.ejb.ScSysTablesHome</home>
               <remote>com.sanchez.ejb.ScSysTables</remote>
               <ejb-class>com.sanchez.ejb.ScSysTablesEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>UniversalCustomer</ejb-name>
               <home>com.sanchez.ejb.ScUniversalCustomerHome</home>
               <remote>com.sanchez.ejb.ScUniversalCustomer</remote>
               <ejb-class>com.sanchez.ejb.ScUniversalCustomerEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>Admin</ejb-name>
               <home>com.sanchez.ejb.ScAdminHome</home>
               <remote>com.sanchez.ejb.ScAdmin</remote>
               <ejb-class>com.sanchez.ejb.ScAdminEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>AutoCommitTranEng</ejb-name>
               <home>com.sanchez.ejb.ScAutoCommitTranEngHome</home>
               <remote>com.sanchez.ejb.ScAutoCommitTranEng</remote>
               <ejb-class>com.sanchez.ejb.ScAutoCommitTranEngEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>TransactionMonitor</ejb-name>
               <home>com.sanchez.ejb.ScTransactionMonitorHome</home>
               <remote>com.sanchez.ejb.ScTransactionMonitor</remote>
               <ejb-class>com.sanchez.ejb.ScTransactionMonitorEjb</ejb-class>
               <session-type>Stateful</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <description>Loan</description>
               <display-name>Loan</display-name>
               <ejb-name>Loan</ejb-name>
               <home>com.sanchez.ejb.ScLoanHome</home>
               <remote>com.sanchez.ejb.ScLoan</remote>
               <ejb-class>com.sanchez.ejb.ScLoanEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>Customer</ejb-name>
               <home>com.sanchez.ejb.ScCustomerHome</home>
               <remote>com.sanchez.ejb.ScCustomer</remote>
               <ejb-class>com.sanchez.ejb.ScCustomerEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>AppOrigination</ejb-name>
               <home>com.sanchez.ejb.ScAppOriginationHome</home>
               <remote>com.sanchez.ejb.ScAppOrigination</remote>
               <ejb-class>com.sanchez.ejb.ScAppOriginationEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
              <session>
               <ejb-name>Account</ejb-name>
               <home>com.sanchez.ejb.ScAccountHome</home>
               <remote>com.sanchez.ejb.ScAccount</remote>
               <ejb-class>com.sanchez.ejb.ScAccountEjb</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Bean</transaction-type>
              </session>
            </enterprise-beans>
            </ejb-jar>

            • 3. Re: could not deploy .ear in Jboss 5.1.0 GA- jdk 1.6
              Wolf-Dieter Fink Master

              I suppose you add the "<ejb-jar version=2.1" during your migration, right?

              If  you do not change the content that might be wrong and such error will occour because of the structure.

              See 'http://java.sun.com/xml/ns/javaee' there are links to the older version.

              If you will migrate the application to EJB2.1 you might have to change the sources and the XML file.

               

              Use a XML editor with validation like JEdit (with the XML plugin) or Eclipse, here you will see what is wrong with the XML-Structure.

              1 of 1 people found this helpful
              • 4. Re: could not deploy .ear in Jboss 5.1.0 GA- jdk 1.6
                Basil George Newbie

                Wolf,

                 

                We have not migrated to 2.1, May be after migrating the source code and xml i would get back to you.