3 Replies Latest reply on Mar 1, 2013 5:54 AM by nickarls

    JAr not able to find war in AS 7.1

    lalitawasthi007

      Hello All

       

      This is my third post to this community and I am really thankfull to this community to help me a lot.

       

      I am migrating a code from Jboss 5.1 to 7.1.

       

      I have an ear file that has an ejb.jar and a war file. I have another jar file lets call it ABC.jar,that is not a part of subdeployment.I have put ABC.jar file in lib of ear file.

       

      Now when I try to run the code a class in ABC.jar file tries to find class that is present in war file,but could not find the class. Means my ABC.jar file is not able to find war file.

       

      Any kind of help will be highly appreciated.

       

      Thanks!!

       

      Regards

      Lalit

        • 1. Re: JAr not able to find war in AS 7.1
          jaikiran

          .war deployments are supposed to have isolated classloader as per spec. What that means is, other (sub)deployments and/or classes outside the .war, won't be able to access classes within the .war. If that "foo" class wants to access a class in the .war, then that "foo" class has to be present within that .war.

          1 of 1 people found this helpful
          • 2. Re: JAr not able to find war in AS 7.1
            lalitawasthi007

            Hello Jaikaran

             

            Thank you for the quick reply.

             

            So you mean if I have a jar named ABC in which class "DEF" wants to access a class "GHI" that is present in  war XYZ , I will have to place the jar file in the lib of war file. Kindly let me know if I have understood right or is there any other way to do this.

             

            Thanks!!

            • 3. Re: JAr not able to find war in AS 7.1
              nickarls

              ABC should be in the WAR. Perhaps you could also pack GHI in a jar JKL and place both ABC and JKL in the ear lib and they might see each other.