5 Replies Latest reply on Apr 22, 2004 8:27 AM by jae

    Problems deploying a EAR file

    stephen Newbie

      I am trying to deploy an ear file with the following structure, but failed. The ejb will uses classes in /lib/ojb.jar but failed. From the stack trace as shown below, it seems like the classes in ejb.jar was not able to load classes in /lib/ojb.jar. I m using Jboss 3.2.3. Can someone please help?

      Thanks

      /ejb.jar/
      ...EJBs
      ...META-INF/
      ......ejb-jar.xml
      ......jboss.xml
      ......MANIFEST.MF [Class-Path: ./lib/ojb.jar]

      /web-app.war/
      ...JSP
      ...WEB-INF/
      ......web.xml [ejb-refs to EJBs]

      /META-INF/
      ...application.xml

      /lib/ojb.jar

      /OJB.properties
      /repository.xml
      /repository_sys1.xml
      /repository_database1.xml

      2004-04-21 11:13:02,626 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/G:/jboss/jboss-3.2.3-n/server/default/deploy/eplyPortal.ear
      2004-04-21 11:13:03,970 WARN [org.jboss.ejb.EJBDeployer] Verify failed; continuing
      java.lang.NoClassDefFoundError: org/apache/ojb/broker/PersistenceBrokerException
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:1647)
      at java.lang.Class.privateGetPublicMethods(Class.java:1770)
      at java.lang.Class.getMethods(Class.java:824)

        • 1. Re: Problems deploying a EAR file
          dannyyates Newbie

          Firstly, don't put orb.jar in the lib directory, but it right at the top of the EAR. Then, change your manifest class path to just orb.jar

          A better approach (once you start having more JARs and complex dependencies between them) is simply to define modules in your application.xml

          • 2. Re: Problems deploying a EAR file
            jae Master

            it should be noted that the "java" element in the application.xml file really isn't for defining jar dependencies (the correct place is in the manifest-file) b/c it's not portable (and that element is for defining "real" java apps).

            however, if you're not concerned about portability, then go right and use it that way. that's the method i use, and i think it's a simpler approach then trying to deal w/ the manifest files.

            • 3. Re: Problems deploying a EAR file
              stephen Newbie

              So simply you means i define a


              ojb.jar


              and i can reference all the classes in the ojb.jar from any of my class in the ear.

              • 4. Re: Problems deploying a EAR file
                stephen Newbie

                I try to include the ojb.jar as "java" element in the application.xml, still the same problem.

                2004-04-22 09:15:39,538 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/G:/jboss/jboss-3.2.3-n/server/default/deploy/eplyPortal.ear
                2004-04-22 09:15:39,538 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/G:/jboss/jboss-3.2.3-n/server/default/deploy/eplyPortal.ear
                2004-04-22 09:15:39,616 ERROR [org.jboss.deployment.MainDeployer] Could not initialise deloyment: file:/G:/jboss/jboss-3.2.3-n/server/default/deploy/eplyPortal.ear
                org.jboss.deployment.DeploymentException: Failed to find module file: ojb.jar
                at org.jboss.deployment.EARDeployer.init(EARDeployer.java:171)
                at org.jboss.deployment.MainDeployer.init(MainDeployer.java:696)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                at $Proxy6.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
                2004-04-22 09:16:25,476 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/G:/jboss/jboss-3.2.3-n/server/default/deploy/eplyPortal.ear
                2004-04-22 09:16:25,507 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/G:/jboss/jboss-3.2.3-n/server/default/deploy/eplyPortal.ear
                2004-04-22 09:16:26,695 WARN [org.jboss.ejb.EJBDeployer] Verify failed; continuing
                java.lang.NoClassDefFoundError: org/apache/ojb/broker/PersistenceBrokerException
                at java.lang.Class.getDeclaredMethods0(Native Method)
                at java.lang.Class.privateGetDeclaredMethods(Class.java:1647)
                at java.lang.Class.privateGetPublicMethods(Class.java:1770)
                at java.lang.Class.getMethods(Class.java:824)
                at org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMethod(AbstractVerifier.java:688)
                at org.jboss.verifier.strategy.EJBVerifier20.verifySessionBean(EJBVerifier20.java:1037)
                at org.jboss.verifier.strategy.EJBVerifier20.checkSession(EJBVerifier20.java:92)
                at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:159)
                at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:475)
                at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
                at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                at $Proxy6.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
                2004-04-22 09:16:26,695 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/G:/jboss/jboss-3.2.3-n/server/default/tmp/deploy/tmp60630eplyPortal.ear-contents/eplyBean.jar
                org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
                at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
                at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
                at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                at $Proxy6.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
                2004-04-22 09:16:26,695 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/G:/jboss/jboss-3.2.3-n/server/default/deploy/eplyPortal.ear
                org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
                at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
                at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
                at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                at $Proxy6.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)


                • 5. Re: Problems deploying a EAR file
                  jae Master

                  was the obj.jar included in the ear?

                  could you repost your directory structure and contents of the application.xml file?