Absent Member.. dsalkin Absent Member..
Absent Member..
1308 views

Linkage error at IAction runtime

Jump to solution

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

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Absent Member.. dsalkin Absent Member..
Absent Member..

Re: Linkage error at IAction runtime

Jump to solution

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

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

Re: Linkage error at IAction runtime

Jump to solution

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

0 Likes
Absent Member.. dsalkin Absent Member..
Absent Member..

Re: Linkage error at IAction runtime

Jump to solution

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

0 Likes
Absent Member.. dsalkin Absent Member..
Absent Member..

Re: Linkage error at IAction runtime

Jump to solution

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?

0 Likes
Absent Member.. dsalkin Absent Member..
Absent Member..

Re: Linkage error at IAction runtime

Jump to solution

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

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.