1 2 Previous Next 19 Replies Latest reply on Aug 23, 2010 8:55 AM by wolfgangknauf

    Error deploy EAR in jboss 5.1

    jesvi

      When we try deploy an application in ear format in JBoss 5.1.0  we have the next error in the process of deployment:

       

       

      13:18:43,433 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console
      13:18:43,589 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/jboss-5.1.0.GA/server/oraMain/deploy/archive.ear/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/C:/jboss-5.1.0.GA/server/oraMain/deploy/archive.ear/web.war/
          at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
          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: java.lang.IllegalStateException: Expected either '.jar' or '.jar/' at the end of web.war
          at org.jboss.ejb3.deployers.Ejb3ClientDeployer.getDeploymentJndiName(Ejb3ClientDeployer.java:214)
          at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:104)
          at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:61)
          at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
          ... 30 more

       

       

       

      In this post (http://community.jboss.org/message/5769)  , the solution is remove Main-Class attribute of manifest.mf, but in this file we don´t have this attribute to remove.

       

       

      We have the follow structure of directories :

      deploy/archive.ear

                       |-lib

                       |-META-INF

                       |                |-application.xml

                       |                |-MANIFEST.MF

                       |-web.war

       

      I attach  the manifest.mf site in archive.ear/META-INF

       

      The same EAR deploy in JBoss4.2.3 without problems.

       

       

      Any Idea?

       

      Thanks

        • 1. Re: Error deploy EAR in jboss 5.1
          jaikiran

          Does the .war contain any META-INF/MANIFEST.MF? What are its contents?

          • 2. Re: Error deploy EAR in jboss 5.1
            jesvi

            Hi ,

            Yes, the web.war contains a META-INF/MANIFEST.MF

             

            The file contents:

            --------------------------------------------------------------------------------------

            Manifest-Version: 1.0
            Ant-Version: Apache Ant 1.7.0
            Created-By: 16.0-b13 (Sun Microsystems Inc.)

            • 3. Re: Error deploy EAR in jboss 5.1
              jaikiran

              Can you post the output of

               

              jar -tf web.war
              
              • 4. Re: Error deploy EAR in jboss 5.1
                jaikiran

                Also please post the contents of your application.xml file.

                • 5. Re: Error deploy EAR in jboss 5.1
                  jesvi

                  I attach  a output.out  file with the output of   "tar -tf web.war" and the application.xml file site in  archive.ear/META-INF

                   

                  Thanks for your fast reply

                  • 6. Re: Error deploy EAR in jboss 5.1
                    wolfgangknauf

                    Hi,

                     

                    WEB-INF\lib contains a lot of JAR files which are already part of JBoss and which will result in conflicts. For example:

                    1) commons-... jar files: some of them are already in JBoss, others not. "commons-logging-1.0.4.jar" and "commons-logging.jar" are probably duplicates, and others are present in different versions, too.

                    2) "hibernate3.jar" - Jboss already contains Hibernate, and probably a different version, which might result in conflicts.

                    3) jboss-....jar - remove them all

                    4) log4.jar - in jboss

                    5) xercesImpl.jar, xml-apis.jar - don't bundle a XML api, JBoss already has one. Including your own xml jars will fail for sure.

                    6) standard.jar - isn't this JSTL? If yes: already in JBoss - remove it.

                    ...to be continued...

                     

                    I don't know where you got all this stuff from, but please clean up. Best is to start a new project and include only required JARs. Every time you hit a "ClassNotFoundException", add one more JAR.

                     

                    Hope this helps

                     

                    Wolfgang

                    • 7. Re: Error deploy EAR in jboss 5.1
                      jesvi

                      Hi,

                      Unfortunatelly , the indications of remove jars seems that not work.

                       

                      We remove the  librarys of WEB-INF/lib in the order you specified. first remove commons-*jar , then restart jboss to redeploy.. , second remove  hibernate3.jar , and restart again .etc etc. In each restart we remove the content of the  folders server/default/tmp , data and work.

                       

                      Even if we remove all the JAR´s of  WEB-INF/lib , the same error "Expected either '.jar' or '.jar/' at the end of web.war" appear when we try to start and deploy our EAR.

                      We don´t obtain a "ClassNotFoundException" yet..

                      Thanks anyway

                      • 8. Re: Error deploy EAR in jboss 5.1
                        jaikiran

                        Some MANIFEST.MF probably has a Main-Class attribute which is triggering this issue. Or maybe a jboss-client.xml. Try looking for these in your application.

                        • 9. Re: Error deploy EAR in jboss 5.1
                          sivaprasad9394

                          you try changing your code like below format,

                           

                           

                          <jboss-web>
                          <class-loading java2ClassLoadingCompliance="false">
                          <loader-repository>myapp:loader=web.war
                          <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
                          </loader-repository>
                          </class-loading>
                          <context-root>proyect</context-root>
                          </jboss-web>
                          • 10. Re: Error deploy EAR in jboss 5.1
                            jesvi

                            In the EAR there are 2 MANIFEST.MF

                            In C:\jboss-5.1.0.GA\server\oraMain\deploy\archive.ear\META-INF

                             

                             

                             

                             

                            The file contents:

                            ---------------------------------------------------------------------------------------------------------------------------------

                            Manifest-Version: 1.0
                            Ant-Version: Apache Ant 1.7.0
                            Created-By: 16.0-b13 (Sun Microsystems Inc.)
                            Built-By: Hewlett-Packard
                            Class-Path: lib/ifxjdbc.jar lib/ojdbc14.jar lib/ojdbc6.jar

                            ..................................................................................................................................

                             

                            In C:\jboss-5.1.0.GA\server\oraMain\deploy\archive.ear\web.war\META-INF

                             

                            The file contents:

                            -----------------------------------------------------------------------------------------------------------------------------------------

                            Manifest-Version: 1.0
                            Ant-Version: Apache Ant 1.7.0
                            Created-By: 16.0-b13 (Sun Microsystems Inc.)

                            ------------------------------------------------------------------------------------------------------------------------------------------

                             

                            No has a Main-Class

                             

                            The EAR not contain a jboss-client.xml

                            • 11. Re: Error deploy EAR in jboss 5.1
                              jesvi

                              Hi,

                              In which file we have to include the <jboss-web> label that you specify?

                               

                              Thanks

                              • 12. Re: Error deploy EAR in jboss 5.1
                                jaikiran
                                Class-Path: lib/ifxjdbc.jar lib/ojdbc14.jar lib/ojdbc6.jar

                                Try removing that entry from the MANIFEST.MF. There are some known issues with Class-Path entry processing with MANIFEST.MF in JBoss AS-5. Anyway, you won't need that entry since, by default any jar in .ear/lib folder is made available in the classpath of the .ear application.

                                • 13. Re: Error deploy EAR in jboss 5.1
                                  jesvi

                                  Hi,

                                  I removed that line in the MANIFEST.MF before , trying several things because not find Main-Class in this file but not work.  Now I remove the line with Class-Path again in MANIFEST.MF, in web.war I remove all JAR´s in WEB-INF/lib then , but unfortunately the same error still appears at jboss startup.

                                  • 14. Re: Error deploy EAR in jboss 5.1
                                    jaikiran

                                    Is that .ear file (the simple one which reproduces this error), something that you can attach here?

                                    1 2 Previous Next