2 Replies Latest reply on Jul 11, 2003 4:49 PM by Ivan O. Parra

    classpath entries in -service.xml causing duplicate jar depl

    Ivan O. Parra Novice

      I have user-service.xml that depends on a common.jar. During deployment, I get this:

      11:47:13,709 WARN [ClassLoadingTask] Duplicate class found: com.activereasoning.exception.DataException
      Current CS: (file:/C:/jboss/jboss/server/default/tmp/deploy/server/default/deploy/common.jar/28.common.jar <no certificates>)
      Duplicate CS: (file:/C:/jboss/jboss/server/default/deploy/common.jar <no certificates>)
      ---
      I tested the environment for a while and found that common.jar was attempting to be deployed twice.

      I tested this theory by create a management-service.xml in the management directory. This service had 1 line:


      Jboss gave this error.
      11:47:13,709 WARN [ClassLoadingTask] Duplicate class found: org.jboss.management.mejb.MEJBSession
      Current CS: (file:/C:/jboss/jboss/server/default/tmp/deploy/server/default/deploy/management/ejb-management.jar/28.ejb-management.jar <no certificates>)
      Duplicate CS: (file:/C:/jboss/jboss/server/default/deploy/management/ejb-management.jar <no certificates>)

      Same thing.
      Is there a way to have a classpath entry in the -service.xml without having this warning?

      -Ivan
      Jboss3.2.1/JDK1.3.1/Win2KProf

        • 1. Re: classpath entries in -service.xml causing duplicate jar
          kbutler Newbie

          Caveat - I've never deployed a user-service - but (I think) I know a little about the ClassLoaders.

          Are you sure you need put the jar in your classpath? My understanding is that there is a central Class Repository that by default classes are entered into; therefore common.jar should be available to by default.

          (I ran into this by trying to deploy the same jar in 2 different EARs; and suprise it was already loaded and I got a DuplicateClass error. You have to make efforts to actually deploy the same JAR twice).

          That's my understanding - somebody pls correct me if I'm wrong.

          • 2. Re: classpath entries in -service.xml causing duplicate jar
            Ivan O. Parra Novice

            The issue I'm having with user-service.xml is the order of deployment. The deployer deploys in this order:
            "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip"

            if your service.xml has a dependency on a jar, you can specify a "classpath" entry in the mbean. If you don't specify it, then you'll get a ClassNotFoundException.

            This worked fine in Jboss3.0.4, not in 3.2.1. There are other options(make a SAR, put the jar in the lib directory, place the jar/xml in an ear), all which satisfy my current needs. I'd still prefer the original solution.

            Sounds like the classloader is not checking the repository when it attempts to deploy a jar that was previously deployed by an mbean. I'm not familiar enough to say EXACTLY how the UCL is handling this. I may be out in left-field(baseball reference JIK).

            -Ivan