El Guapo
El Guapo

Reputation: 5781

Coherence Cannot Find User-Defined POJOs Deployed as JAR in Web Logic 11g

I have the following configuration in WebLogic 10g... 5 WARs deployed and 1 JAR deployed that contains classes used withing the 5 WARs. Inside each WAR is the coherence.jar file (that contains a pof-config.xml file) that declares all of the user-defined types to be serialized within the cache (entire cluster that each of the WARs share).

This scenario was working FLAWLESSLY when deployed inside of WebLogic 10g, however, we have moved from 10g to 11g, and all-of-a-sudden each Coherence instance inside the cluster cannot find the types for each of the user-defined POJOs.

Is there a way to tell Coherence to look at the deployed JAR to find types (akin to the way you do inside of the weblogic-application.xml file that is included in each WAR (EAR)?

Upvotes: 1

Views: 207

Answers (2)

David G
David G

Reputation: 6317

In versions of WebLogic prior to 12.1.2 there is no way to specify where Coherence will look for its configuration files or POJO classes. It will use the thread context classloader by default. That means that if the configuration files are visible to the WAR classloader, they should be found by Coherence. Static files in the root of the WAR should be found. POJO classes will also be found from the WAR classloader, so they should be found if they are in WEB-INF/classes. If they are packaged in a JAR, they should be found in WEB-INF/lib. In other words, there should be nothing different from normal WAR classloading.

You can debug classloading in WebLogic, by adding Java system properties to the command line options. If you are using the WebLogic shell scripts, you can use the JAVA_OPTIONS environment variable. Set the following before starting the server:

export JAVA_OPTIONS="-Dweblogic.utils.classloaders.GenericClassLoader.Verbose=true -Dweblogic.debug.DebugClassFinder=true -Dweblogic.utils.classloaders.ClasspathClassFinder=true -Dweblogic.utils.classloaders.ChangeAwareClassLoader.Verbose=true -Dweblogic.debug.ClassloaderWebApp=true"

Note that this will produce an enormous amount of detail for every class loaded in the server. For your case, you might only need the last setting.

Beginning with WebLogic 12.1.2, there's a new feature called Managed Coherence Servers that includes defining the Coherence cluster in WebLogic and a new archive type for deploying Coherence.

Upvotes: 1

cpurdy
cpurdy

Reputation: 1236

I can't quite tell all of the details from the question. You have 6 independent archives deployed, comprising 5 WAR files and 1 JAR file? Each WAR file also has Coherence embedded inside it by taking a (slightly modified) coherence.jar and placing that inside each WAR file? Is the WLS 11g version 10.3.6 or ..? What version is the Coherence library?

Upvotes: 0

Related Questions