Re: Linkage error at IAction runtime (216 Views)
Reply
Advisor
dsalkin
Posts: 30
Registered: ‎06-07-2012
Message 1 of 5 (259 Views)
Accepted Solution

Linkage error at IAction runtime

[ Edited ]

Hi,

Running a custom IAction which calls a SiteScope API method. So I must include the SiteScope API jars (source file attached).

Debugging using the suspend=y option I see that the action crashes at the point where I actually call the SiteScope method (full stack attached):

ERROR [11982507@qtp0-181] (01:37:34,730) com.iconclude.webservices.ras.RCAgentServiceSoapBindingImpl - execute failed for SitescopeAlertsDisable.jar:com/hp/saas/oo/content/sitescope/api/AlertsDisableAssociated.class
INFO   | jvm 1    | 2013/08/18 01:37:34 | java.lang.RuntimeException: error instantiating action class: SitescopeAlertsDisable.jar/com/hp/saas/oo/content/sitescope/api/AlertsDisableAssociated.class, reason: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.axis.message.MessageElement.getChildElements(Ljavax/xml/namespace/QName;)Ljava/util/Iterator;" the class loader (instance of com/iconclude/webservices/ras/ReverseClassLoader) of the current class, org/apache/axis/message/MessageElement, and the class loader (instance of <bootloader>) for interface javax/xml/soap/SOAPElement have different Class objects for the type javax/xml/namespace/QName used in the signature

It seems that this linkage error occurs when a class is loaded by two classloaders who name their instance of it with a different name.

Why are two class loaders at work here?

  • I import the SiteScope API into my class.
  • I don't export the SiteScope API libs themselves. I don't export .classpath (project snapshot attached)
  • I place the SiteScope API jars in the lib/AlertsDisableAssociated directory which I created on the RAS.

So I expect OO to link just once. What am I doing wrong?

Regards,

David Salkin

HP SaaS

Please use plain text.
Frequent Advisor
Lucian-Revnic
Posts: 30
Registered: ‎09-22-2011
Message 2 of 5 (224 Views)

Re: Linkage error at IAction runtime

Hi David,

 

Have you tried to name the folder under lib: SitescopeAlersDisable?

 

 

According to the screenshot you've attached this may be the issue (name of the jar and the folder differs)

 

HTH,

Lucian

Please use plain text.
Advisor
dsalkin
Posts: 30
Registered: ‎06-07-2012
Message 3 of 5 (216 Views)

Re: Linkage error at IAction runtime

Thanks. When I wrote above "I place the SiteScope API jars in the lib/AlertsDisableAssociated" I made a mistake, I meant lib\SitescopeAlertsDisable".

 

I have attached a snapshot (sameName.jpg). Have a look - I think this at least is correct.

 

Regards,

 

David

Please use plain text.
Advisor
dsalkin
Posts: 30
Registered: ‎06-07-2012
Message 4 of 5 (181 Views)

Re: Linkage error at IAction runtime

Does anyone have any idea about this?

 

The naming of jars and directories is correct. Code seems to be fine.

 

What is OO's problem?

Please use plain text.
Advisor
dsalkin
Posts: 30
Registered: ‎06-07-2012
Message 5 of 5 (147 Views)

Re: Linkage error at IAction runtime

The reason was that a few libraries were duplicated in the IActions private directory: jaxrpc, axis and commons-logging.

 

The class loader had already loaded those. Removing them from the private directory solved the issue.

 

Regards,

 

David

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation