Forum Stats

  • 3,873,719 Users
  • 2,266,633 Discussions


LinkageError with on WebLogic

Rod Allen
Rod Allen Member Posts: 9 Blue Ribbon
edited Jan 21, 2018 3:36AM in Java User Groups Discussions

Hi All,

We are having a problem with our software when running on WebLogic 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 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(

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

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

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(

    at java.lang.reflect.Constructor.newInstance(

    at java.lang.reflect.Proxy.newProxyInstance(

    at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(

    at org.springframework.aop.framework.ProxyFactory.getProxy(

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


This appears to be clashing with this file in our war WEB-INF\plugins\

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

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><br/>  <prefer-web-inf-classes>false</prefer-web-inf-classes><br/>  <prefer-application-packages><br/>  <package-name>org.aopalliance.*</package-name><br/>  </prefer-application-packages><br/></container-descriptor>




  • Rod Allen
    Rod Allen Member Posts: 9 Blue Ribbon
    edited Jan 19, 2018 10:16AM

    well it looks like I have fixed my own problem

    I modified the values of





    in the RAP war file's launch.ini

    this seems to have fixed it although not entirely sure how.

  • karianna
    karianna Member Posts: 205 Blue Ribbon
    edited Jan 21, 2018 3:27AM

    Can a moderator please move this to the Weblogic community?

    @Rod Allen - Only quick suggestion I'd have is to get your apps to have isolated class loaders (in Jboss / Wildfly there's an option to isolate the parent class loader to avoid clashes like this)

  • karianna
    karianna Member Posts: 205 Blue Ribbon
    edited Jan 21, 2018 3:36AM

    Heh, didn't see your answer before - that'll do the trick yes.