I have an intermittent linkage error thrown: (That\'s basically all the information I have)
java.lang.LinkageError loader constraint violation:
when resol
Does this mean that I have 2 versions of java.xml.rpc.Service loaded? Is that so?
Yes.
How can that happen?
It happens when you have two classloaders both loading the same class. In your case, the classloaders are instances of different ClassLoader classes:
java.net.FactoryURLClassLoader
and
weblogic.utils.classloaders.ChangeAwareClassLoader
what is the way to resolve it?
I'm not a Weblogic user, but the theoretical solution is to put the JAR file containing the classes in question into the classpath of an common ancestor classloader of the two above.
The solution was eventually to update the weblogic-application.xml
file of the deployed app
The application used an old jaxrpc-api.jar
that we could not remove for various reason,
The solution we used to prefer the internal jar was this (Is there a better way?)
<wls:prefer-application-packages>
...
<wls:package-name>java.xml.rpc.*</wls:package-name>
</wls:prefer-application-packages>