Search code examples
javaweblogicshared-librariesapplication-server

How to make an EAR refer WAR shared library


I would like to get a help from you all. The below is the issue I am currently facing with.

I have added a reference of WAR shared library in weblogic-application.xml of EAR file.

In EAR, I do have a ejb module which has "library-directory" tag in application.xml. I want ejb module to refer jar files in shared library but it looks for jar files in lib folder of EAR.

In lib folder of EAR, jar files are not available but the jars are available in WAR shared library.

How to resolve this issue and make the ejb module of EAR refer the jars of WAR shared library.

Please add a comment if the problem is not completely understandable.

Many thanks in advance for your help!


Solution

  • Try defining the jars you need as modules in application.xml. Something like:

    <module>
        <java>pathToWarLib/needed.jar</java>
    </module>