Whilst deploying an Eclipse RAP war file on WebLogic 12.2.1.3, we are encountering the following error;
java.lang.LinkageError: loader constraint violation: loader previously initiated loading for a different type with name "org/aopalliance/aop/Advice"
After performing some analysis we identified the issue is due to WebLogic 12.2.1.3 shipping with org.glassfish.hk2.external.aopalliance-repackaged.jar within oracle_common\modules, and this conflicts with com.springsource.org.aopalliance_1.0.0.jar, within the WEB-INF\plugins directory of our WAR file.
We have tried a few things to remediate this, but with no luck so far;
Removed org.glassfish.hk2.external.aopalliance-repackaged.jar from oracle_common\modules (WebLogic deploys but then shuts itself down)
Remove com.springsource.org.aopalliance_1.0.0.jar from the WAR file (WebLogic starts, but does not deploy the bundles within the WAR file)
Updated weblogic.xml in the WAR file with;
<container-descriptor>
<prefer-web-inf-classes>false</prefer-web-inf-classes>
<prefer-application-packages>
<package-name>org.aopalliance.*</package-name>
</prefer-application-packages>
</container-descriptor>
Copied com.springsource.org.aopalliance_1.0.0.jar to the WEB-INF\lib folder of the WAR, with the above weblogic.xml change
Any suggestions of other changes we could try would be much appreciated.
Many Thanks
Mike
try updating the launch.ini in your war file, setting the values for osgi.parentClassloader and osgi.contextClassLoaderParent to ext :-
osgi.parentClassloader=ext
osgi.contextClassLoaderParent=ext
Cheers
Rod