6 Replies Latest reply on Oct 9, 2002 5:56 AM by Andi

    Deployment problems with JBoss 3.0.0/3.0.2 (Classpath/Classl

    Steffen Dingel Newbie

      When running our application (EAR file) which consists of several EJB-jars and library-jars on JBoss 3.0.0, we get an IllegalAccessException during a call from an EJB client. A class in one of the libraries tries to access another class within the same package of the same library. The accessed class has default (package) access, so this should be okay. But JBoss seems to have loaded the accessed class before, during a call from a Client to a different EJB using a different class loader instance. So the VM treats the classes as being in different packages.

      Experimenting with the classpath entries in the manifest files of the EJB-jars showed that removing the references to the libraries in all but one of the EJB-jars solves the problem on JBoss 3.0.0. The libraries are still visible from the other EJB-jars. Is this an intended behaviour of the JBoss class loader? It doesn't seem to conform with J2EE?!

      Deploying the same EAR on JBoss 3.0.2 results in the following exception:
      -------------------------------------------------------
      13:40:00,889 INFO [EjbModule] Registration is not done -> destroy
      13:40:00,909 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment
      .scanner.URLDeploymentScanner$DeployedURL@f49cdda8{ url=file:/C:/jboss-3.0.2/ser
      ver/default/deploy/EaiTestApp.ear, deployedLastModified=0 }
      org.jboss.deployment.DeploymentException: error in create of EjbModule: file:/C:
      /jboss-3.0.2/server/default/tmp/deploy/server/default/deploy/EaiTestApp.ear/61.E
      aiTestApp.ear-contents/trend-eai.jar; - nested throwable: (javax.management.Inst
      anceAlreadyExistsException: jboss.j2ee:service=EjbModule,url=file%/C%/jboss-3.0.
      2/server/default/tmp/deploy/server/default/deploy/EaiTestApp.ear/61.EaiTestApp.e
      ar-contents/trend-eai.jar already registered.)
      --------------------------------------------------------
      (trend-eai.jar is one of our libraries).
      Until now, I didn't get the application to work on 3.0.2 at all. Removing the references from all EJB-jars results in a ClassNotFoundException (as you would expect).

      Any ideas?
      Thanks in advance!

      Steffen