1 Reply Latest reply: Nov 12, 2012 10:08 PM by Kalyan Pasupuleti-Oracle RSS

    ClassNotFound in case of class from jar in lib folder


      I get an application that I have to deploy on Weblogic AS. It is big ear with couple of wars inside. Let's say it is bigApp.ear.
      It is deployed and state is Active. When go to browser and try to run an application I get an error. In logs I found ClassNotFoundException. The error is related to a class, let's say: com.some.package.Abc - I have this class in a jar file, let's say someFile.jar and it is in a folder WLS_FOLDER\samples\domains\wl_server\lib where:
      - WLS_FOLDER is my WLS installation folder
      - wl_server - name of my domain where I deploy an application.

      I wrote a small application (simple form), let's say simpleApp.war. The application uses the class com.some.package.Abc, but the class is not put into the war (WEB-INF/lib) of my small aplication (I use Maven and dependency to someFile.jar has scope provided, so simpleApp.war does not contain it). The result is that simpleApp works fine and there is no error in logs. It creates an instance of com.some.package.Abc and correctly display toString() of the instance of the class in a browser. So this means that application simpleApp is able to see and use classes that are inside jars in WLS_FOLDER\samples\domains\wl_server\lib folder.

      So my guess is that there is something in bigApp.ear but I don't know where to search. I read about class loaders hierarchy in Weblogic and Class Loader Filtering. But I have looked inside every weblogic.xml in bigApp.ear and wars that are inside and there is no filter on "com.some.package" or "com.some" or "com" only different packages.

      Is there any other mechanism in Weblogic that could block the visibility of classes from jars from lib folder of domain to the applications that are deployed in that domain??