3 Replies Latest reply on Aug 22, 2003 2:41 PM by kprindia

    use another jar in the same ear through Class-Path broken?

    Weiqing Huang Newbie

      hi there,

      i am using jboss 3.2.1 with an application like this:
      foo.ear:
      foo-ejb.jar
      bar-client.jar

      bar-client.jar has all the client code for another application. in the manifest file of foo-ejb.jar, i have

      Class-Path: bar-client.jar

      however i still get ClassDefNotFound exception when trying to access any bar client code.

      if i move bar-client.jar to the deploy directory, it would work. is this a bug? thanx.

        • 1. Re: use another jar in the same ear through Class-Path broke
          Raja Master

          Do you have a newline after the Class-path setting.. for e.g in ur manifest

          Manifest-Version: 1.0
          Class-Path: logging.jar etc/
          <new line here thats empty>

          -Raj

          • 2. Re: use another jar in the same ear through Class-Path broke
            Weiqing Huang Newbie

            yes, there is a new line. it's generated by xdoclet btw.

            if i take out the class path in manifest file, the jar file in the deploy directory won't be picked up anymore, which vefifies that the class path entry in the manifest file is used. however, i really want to have the jar file included in my ear, instead of separately deployed.

            • 3. Re: use another jar in the same ear through Class-Path broke
              kprindia Newbie

              This is about jboss 3.2.1

              Even i have similar problem.
              This is my directory structure
              Trendium.ear
              OB.jar
              Backend.jar
              tsglt50.jar
              tsgltc5.jar
              Beans.jar
              --- META-INF
              --- com/trendium/ejbs/*.java

              Beans in Beans.jar requires the other four jars.
              I specified that dependency using Class-Path : Backend.jar, tsglt50.jar, tsgltc5.jar
              with a new line after this line.

              When i deploy the beans.jar, jboss says that Beans.jar deployed.
              But when i tried to do a jndi lookup on the bean, it says NameNotFound. By trial and error i removed the Class-Path line in the manifest line and now i am able to find the bean using JNDI lookup.

              Now when i try to use the bean after lookup, it is not able to find some of the classes needed by the beans in beans.jar as they are present in the other jar files.

              I am interested to know where to place the other jars such that it is visible to Beans.jar in jboss 3.2.1

              I appreciate anybody's response to my posting.

              Thank you