Thursday, July 2, 2015

Unresolved Webapp Library references

Unresolved Webapp Library references See http://docs.oracle.com/cd/E13222_01/wls/docs92/programming/libraries.html

If your webapp requires a specific version of a library, you can use the container-descriptor/prefer-application-packages/package-name clause in the weblogic.xml of your webapp. But then you should also refer to the library specific version with another clause:

   <library-ref>
      <library-name>jax-rs</library-name>
        <specification-version>2.0</specification-version>
        <exact-match>false</exact-match>
    </library-ref>


This is only a library-ref, so the library must be made available in the config.xml:

  <library>
    <name>jax-rs#2.0@2.5.1</name>
    <target>icr_v00_25000_localhost</target>
    <module-type>war</module-type>
    <source-path>/path/to/yourlibrary.war</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    <staging-mode>nostage</staging-mode>
    <plan-staging-mode xsi:nil="true"></plan-staging-mode>
    <cache-in-app-directory>false</cache-in-app-directory>
  </library>




otherwise you will get the dreaded "Unresolved Webapp Library references for ...."

On the whole I find these classloader and version issues an extremely uninteresting topic...

No comments: