SOAP Calls fail: java.lang.LinkageError: loader constraint violation: on org/json/JSONObject"

Document ID : KB000008997
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

When migrating an older Identity Manager to version 14.1 or installing a new IM 14.1, administrator might observe that all policy Xpress code to call SOAP fails with following error:

15:06:03,585 WARN  [org.jboss.modules] (http-0.0.0.0:8080-11) Failed to define class org.json.JSONObject in Module "deployment.iam_im.ear.user_console.war:main" from Service Module Loader: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/modules/ModuleClassLoader) previously initiated loading for a different type with name "org/json/JSONObject"

at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_151]

at java.lang.ClassLoader.defineClass(ClassLoader.java:763) [rt.jar:1.8.0_151]

at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:359) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:480) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:275) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:90) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.Module.loadModuleClass(Module.java:573) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:203) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.10.Final-redhat-1]

at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.10.Final-redhat-1]

at com.ca.identitymanager.policyxpress.plugins.data.PxDataWebServiceClient.getObject(PxDataWebServiceClient.java:269) [identitymanager.jar:]

at com.ca.identitymanager.policyxpress.structures.PxPolicy.setElementData(PxPolicy.java:102) [identitymanager.jar:]

at com.ca.identitymanager.policyxpress.structures.PxPolicy.buildElementValues(PxPolicy.java:94) [identitymanager.jar:]

at com.ca.identitymanager.policyxpress.structures.PxPolicy.getElementStr(PxPolicy.java:73) [identitymanager.jar:]

at com.ca.identitymanager.policyxpress.structures.PxHandler.parseParam(PxHandler.java:81) [identitymanager.jar:]

at com.ca.identitymanager.policyxpress.structures.PxHandler.getParam(PxHandler.java:152) [identitymanager.jar:]

at com.ca.identitymanager.policyxpress.plugins.data.PxDataComparator.getObject(PxDataComparator.java:58) [identitymanager.jar:]

at com.ca.identitymanager.policyxpress.structures.PxPolicy.setElementData(PxPolicy.java:102) [identitymanager.jar:]

at com.ca.identitymanager.policyxpress.structures.PxPolicy.buildElementValues(PxPolicy.java:94) [identitymanager.jar:]

Environment:
Identity Manager R14.1
Cause:

The problem is caused by an extra json jar file easyjson-1.0.0rc1.jar in <IM application deployment path>\iam_im.ear\user_console.war\WEB-INF\lib\

Resolution:

- Remove easyjson-1.0.0rc1.jar under <IM application deployment path>\iam_im.ear\user_console.war\WEB-INF\lib\

- Restart IM application.