Skip to Main Content

Java User Groups

LinkageError with com.springsource.org.aopalliance_1.0.0.jar on WebLogic

Rod AllenJan 18 2018 — edited Jan 21 2018

Hi All,

We are having a problem with our software when running on WebLogic 12.2.1.3. Its an Eclipse RAP based war file that works fine when deployed to WebLogic 12.1.3 but when we try to deploy it to WebLogic 12.2.1.3 we are getting a java.lang.LinkageError, specifically

java.lang.LinkageError: loader constraint violation: loader (instance of .....) previously initiated loading for a different type with name "org/aopalliance/aop/Advice"

    at java.lang.Class.forName0(Native Method)

    at java.lang.Class.forName(Class.java:264)

    at com.sun.proxy.$Proxy108.<clinit>(Unknown Source)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

    at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:739)

    at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:117)

    at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)

We have narrowed it down to a new jar that was added in WebLogic 12.2.1.2

oracle_common\modules\org.glassfish.hk2.external.aopalliance-repackaged.jar

This appears to be clashing with this file in our war WEB-INF\plugins\com.springsource.org.aopalliance_1.0.0.jar

1) Has anyone seen anything like this when upgrading their applications from Weblogic 12.1.3 to 12.2.1.2/3 ?

2) Does anyone know what this file org.glassfish.hk2.external.aopalliance-repackaged.jar does and why it was added to WebLogic? We tried removing it but WebLogic wont start.

3) Can anyone suggest a workaround to avoid the clash? We have tried using this in weblogic.xml but it had no effect :-

<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>

Regards

Rod

Comments
Post Details
Added on Jan 18 2018
3 comments
522 views