4 Replies Latest reply on Aug 25, 2014 1:34 PM by dvohra21

    Weblogic-Domain Lib from J2EE Shared Lib-Issue




      In our application we where using the J2EE Shared Lib where we deployed all the dependent third party JAR files. We have multiple application sharing the J2EE Application referring the Shared Library using the weblogic shared lib concept. But as the number of application increased we found that each application is loading the same java file in the classpath thereby increasing the PERM-GEN space.


      So to reduce the PERM-GEN we planned to deploy all the third party jar files on the DOMAIN LIB, but when we do deploy the jar file onto the DOMAIN Lib of Weblogic we are facing multitude of issues.


      1. ClassNotFoundException - java.lang.ClassNotFoundException: org.osgi.framework.BundleActivator (We are using Spring, Drools, Camel. If we remove the Spring, Drools and Camel the Weblogic server starts).

      2. When "osgi-3.0.1.jar" is deployed to the DOMAIN LIB. Then Weblogic Server comes to the RUNNING mode. But when deploying the application we have to make the certain changes to the Application to resolve issues, but even after resolving there are many issues.


      The list of Third Party file are mentioned below which includes Spring, Drools, Camel,CXF, hibernate3.6,


      Weblogic Server used - 11g.


      Can someone please let us know why there is a difference when the same set of jar files when deployed as an Shared Lib is working fine without the OSGI but when deployed as part of the DOMAIN LIB the same fails. More over whether we can place the third party JAR file inside the DOMAIN LIB folder. If so what are the JAR files which should be placed.


      Thanks & Warm Regards,



      Message was edited by: 8fa8a894-c3b6-4573-af93-58070bc7ca53. Hello All, Can you please provide your thoughts.It will be very helpful. Thanks & Warm Regards, Subramaniam V.

        • 1. Re: Weblogic-Domain Lib from J2EE Shared Lib-Issue
          Luz Mestre-Oracle

          Hi Subbu

          You can check the documents below:

          1. It is not a WebLogic Server (WLS) Support Pattern: Investigating Different Classloading Issues (Doc ID 1572862.1)

          2. Understanding WebLogic Server Application Classloading - 11g Release 1 (10.3.6)

          "The lib directory is not recommended as a general-purpose method for sharing a JARs between one or two applications deployed in a domain, or for sharing JARs that need to be updated periodically. If you update a JAR in the lib directory, you must reboot all servers in the domain in order for applications to realize the change. If you need to share a JAR file or Java EE modules among several applications, use the Java EE libraries feature described in Chapter 9, "Creating Shared Java EE Libraries and Optional Packages.""


          Probably the application fail because the have configured the shared libs inside of application descriptors like weblogic.xml and weblogic-application.xml

          3. Changing all the applications might be a risk. Would it be possible to add more managed servers to the domain to distribute the load?


          I hope this helps

          Best Regards


          • 2. Re: Weblogic-Domain Lib from J2EE Shared Lib-Issue

            Shared libraries require the least configuration, just the weblogic.xml is required to include a reference to the shared library.

            weblogic.xml Deployment Descriptor Elements - 12c Release 1 (12.1.1)

            • 3. Re: Weblogic-Domain Lib from J2EE Shared Lib-Issue

              Thanks for your response.


              Thanks Luz Mestre-Oracle

              . Yes Agree with you that when there is a change in the JAR file all the Cluster in the Domain have to be restarted. Currently we have only 1 Cluster Configured for where all the applications are deployed.


              Increasing the number of Cluster in the Domain is a viable option and we have tried this Option. But the issue is even in if we introduce new clusters the as the number of application referencing the shared library is going to remain the same. And as the number of Applications increase the memory footprint is going to increase.


              JAR File update in the domain Lib is not a common activity in our Application. So we might even take a scheduled window to restart the Clusters in the Domain.


              But the issue of moving way from Shared Lib to DOMAIN Lib is what I am not able to figure out. As mentioned in my post when I have third party JAR which my applications are referencing too like Camel, Spring, Hibernate,etc are packaged as part of either the EAR or Shared Library are deployed without any errors. But if the same set of JAR files being deployed as part of Domain LIB fail with the "ClassNotFoundException - java.lang.ClassNotFoundException: org.osgi.framework.BundleActivator".




              Thanks for your response. Our Application is currently using Shared Library. The configuration is very simple and we have it working. But the issue is due to Shared Library each of the referencing applications are loading the dependent java classes into PERM-GEN thereby increasing the PERM-GEN.


              We are currently using Weblogic 11.g, in which we are facing the ClassNotFoundException. but when deployed the same set of JAR in the DOMAIN lib in Weblogic 12c it was successful and all the applications got deployed successfully and the memory foot print was reduced significantly. But the challenge is we cannot use Weblogic 12C.


              Do you have any thoughts on how to solve the issue on Weblogic 11g.