Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. GlassFish runs an older version of the Apache Felix OSGI container, so there is a class loader conflict.

    Code Block
    java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.felix.framework.wiring.BundleCapabilityImpl.getResource()Lorg/osgi/resource/Resource;" the class loader (instance of org/glassfish/web/loader/WebappClassLoader) of the current class, org/apache/felix/framework/wiring/BundleCapabilityImpl, and the class loader (instance of java/net/URLClassLoader) for interface org/osgi/resource/Capability have different Class objects for the type tyImpl.getResource()Lorg/osgi/resource/Resource; used in the signature
    

     To mitigate this, we will need to downgrade the Apache Felix libraries before deploying to GlassFish.

  2. Expand (unzip) jw.war
  3. Delete the newer Apache Felix jar files from WEB-INF/lib:
    1. org.apache.felix.framework-4.6.1.jar
    2. org.apache.felix.main-4.6.1.jar
  4. Add the older Apache Felix jar files into WEB-INF/lib:
    1. org.apache.felix.framework-4.0.3.jar
    2. org.apache.felix.frameworkmain-4.0.3.jar
  5. Add a modified Apache Felix config.properties file into WEB-INF/classes which contains a new property felix.service.urlhandlers=false:
    1. config.properties
  6. Deploy the updated jw.war and jwdesigner.war

...