0 Replies Latest reply on Nov 21, 2012 8:34 AM by 804792

    Referencing Shared Java EE Libs in Weblogic from WAR inside EAR

    804792
      We have a number of applications that need to reference to both Oracle and our own Shared Java EE Libraries on WebLogic. They are structured as folows:

      Our own shared library, "framework", is packaged as a JAR inside an EAR, along with all non-Oracle, third-party libraries (JAR:s) and deployed as a shared library in WebLogic. This is it's manifest:

      Manifest-Version: 1.0
      Created-By: Apache Maven 3.0.4
      Built-By: lajokon
      Build-Jdk: 1.7.0_07
      Implementation-Vendor: <organization>
      Implementation-Title: Framework Lib
      Implementation-Version: 15.0.2
      Implementation-Vendor-Id: org
      Specification-Vendor: <organization>
      Specification-Title: Framework Lib
      Specification-Version: 15.0.2
      Extension-Name: framework-lib
      All JAR:s are in APP-INF/lib

      The applications are each packaged in a WAR inside its own EAR. The WAR weblogic.xml:

      <wls:weblogic-web-app>
      <wls:weblogic-version>10.3.6</wls:weblogic-version>
      <wls:context-root>app-name</wls:context-root>
      <wls:library-ref>
      <wls:library-name>adf.oracle.domain.webapp</wls:library-name>
      <wls:specification-version>1.0</wls:specification-version>
      <wls:exact-match>false</wls:exact-match>
      </wls:library-ref>
      <wls:library-ref>
      <wls:library-name>jsf</wls:library-name>
      <wls:specification-version>2.0</wls:specification-version>
      <wls:exact-match>false</wls:exact-match>
      </wls:library-ref>
      </wls:weblogic-web-app>

      The EAR application.xml:

      <application>
      <display-name>app-name</display-name>
      <module>
      <web>
      <web-uri>app-name.war</web-uri>
      <context-root>/app-name</context-root>
      </web>
      </module>
      </application>

      The EAR weblogic-application.xml:

      <weblogic-application>
      <library-ref>
      <library-name>adf.oracle.domain</library-name>
      <specification-version>1.0</specification-version>
      <exact-match>false</exact-match>
      </library-ref>
      <library-ref>
      <library-name>coherence</library-name>
      <specification-version>3.7</specification-version>
      <exact-match>false</exact-match>
      </library-ref>
      <library-ref>
      <library-name>framework-lib</library-name>
      <specification-version>15.0</specification-version>
      <exact-match>false</exact-match>
      </library-ref>
      </weblogic-application>

      All libraries are deployed by default or deploy correctly in WL. As does the application EAR.

      But, when I access the application i get runtime errors saying it can't load resources located in the WAR:s WEB-INF/classes dir!?

      However, I can see, from log output, that it loads resources from the Framework EAR. Why does WL not seem to care about the contents of my WAR?