cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with axis2 and QName class

0 Kudos

Hello,

We have deployed AXIS2 library with a library project (J2EE server component) as it is specify by a SAP guide. We deployed the sda file correctly and we know how to reference this library in Portal Application and J2ee Module WEB or EJB.

The problem is when we want to use internally javax.xml.namespace.QName is thrown an exception. This exception is shown bellow:

java.lang.LinkageError: loader constraints violated when linking javax/xml/namespace/QName class

at wpt.ConventerStub.populateAxisService(ConventerStub.java:52)

at wpt.ConventerStub.<init>(ConventerStub.java:100)

at wpt.ConventerStub.<init>(ConventerStub.java:89)

at wpt.ConventerStub.<init>(ConventerStub.java:140)

at wpt.ConventerStub.<init>(ConventerStub.java:132)

at com.eadscasa.axis2.Axis2Converter.doContent(Axis2Converter.java:26)

In the guide is said that we have to deploy a library project to avoid this problem but we still are getting it. I have realized that Qname class is a basic class into the JDK 1.4 and in different projects as AXIS2 making revision about this class.

How can I deploy these libraries (jars) without dependencies with SAP Portal libraries?

Is there any way to setup the classloader to avoid this error?

In the documentation about this kind of project it is said that you cannot deploy libraries (*.jar) with the same name. I donu2019t know if it happens the same with the class.

We have to develop web Services with Soap 1.2 specification, SAML etc and we need to develop this class because sap portal doesnu2019t support this kind o features.

Regards,

Daniel Urbano

View Entire Topic
hodlozinski
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daniel,

Sorry about the delayed answer.

There seems to be some confusion on the overall architecture of the scenario described in my paper. For an axis2 web service implementation the SOAp entry point is always the axis web application and step 4 simply describes of how to get this axis application deployed with its reference to the J2EE library. The library contains the actual implementation and it is thus avoided that the implementation has access to the default classloader of the web application which would result in errors like the one you are facing.

So if one would assume that the full implementation of the web service would reside in the library with no dependencies to other components, this should work fine.

Am I right in assuming that you try to access portal components from the library component? This actually might result again in classloader conflicts. A solution would be to separate the portal component functionality that is required for the web service implementation into an own library that would be referenced by both the portal components and the web service implementation.

As you can see I am still trying to understand your general architecture.

Best regards,

HaJo

Amey-Mogare
Contributor
0 Kudos

Hello HaJo,

Can you please elaborate what do you mean by following?

"So if one would assume that the full implementation of the web service would reside in the library with no dependencies to other components, this should work fine".

We have stub class generated using wsdl2java command of AXIS2 and would like to call it from JSPDynpage.

I am getting "java.lang.LinkageError: loader constraints violated when linking javax/xml/namespace/QName class" runtime error.

Thanks & Regards,

Amey

Amey-Mogare
Contributor
0 Kudos

Hello,

I could resolve the issue.

Please see my last reply to this thread: -

http://scn.sap.com/thread/3211554