cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong version of QName during Java mapping tests

Former Member
0 Kudos

I am trying to test my Java mappings. In the mapping, I am using XmlBeans to parse the XML message files. However, XmlBeans contains a newer version of javax.xml.namespace.QName class. But the Integration Engine has an older version of QName somewhere in the classpath. As the result, I get this error:

java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

Does anyone know how to work around this problem? Many thanks!

Kenny

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

I solved it myself. It was a class loader problem. Thanks everyone!

Kenny

ralitsa_vassileva
Discoverer
0 Kudos

Please note, that this is not a solution; changing the content of J2EE Engine in any not officially supported way (as here: replacing files on the file system) makes the product not oficcially supported. All the subsequent issues from this change will be considered as consulting. The recommended way of using third party libraries is described in SAP Note 990854.

Former Member
0 Kudos

Hi,

I am meeting the same problem now. In note 990854:

1. Declare all jars of the third party implementation in a separate library

<code>Confused... how to declare them in a Library?</code>

2. Create an interface to access and work with the third party implementation classes and bundle it with the jars files in the library mentioned in point 1 above.

<code>Still don't know what to do....</code>

3. Specify a reference from your application to the library created in point 1 above.

Any help is much appreciated~~

Thanks,

Ray

Former Member
0 Kudos

I found the jar file. It's the jaxrpc-api.jar in \j2ee\cluster\server0\bin\ext\webservices_lib directory. I replaced the QName class with a newer version. That fixed the problem.

However, now I got another error message.

javax.xml.stream.FactoryConfigurationError; Provider com.bea.xml.stream.MXParserFactory not found

In the mapping, I am using StAX for some parsing. The StAX jar file is included in the classpath. I imported file to Imported Archives. But the Integration Engine is not picking up the jar file during mapping tests.

Thanks!

Kenny

Former Member
0 Kudos

No, XI always uses the one from the J2EE engine. I am having difficulties finding the jar file which contains the QName class. Do you have any idea which one it might be?

Thanks!

Kenny

Shabarish_Nair
Active Contributor
0 Kudos

chk to find the jar in the server @ the path SID\DVEBMGS10\j2ee\cluster\server0\temp\classpath_resolver

moorthy
Active Contributor
0 Kudos

HI,

Are you looking for jar files for java mapping- if so , you can get from your server-

j2ee\cluster\server0\apps\sap.com\com.sap.xi.services

It will be there inside the com.sap.xi.services folder

Regards,

Moorthy

bhavesh_kantilal
Active Contributor
0 Kudos

Kenny,

***Reposted same answer**

Regards,

Bhavesh

Message was edited by:

Bhavesh Kantilal

bhavesh_kantilal
Active Contributor
0 Kudos

Kenny,

Import the new version of the Jar under your Imported Archives in your Namespace in your SWCV and test you scenario.

AFAIK, the Jar in the SWCV will be referred to if it is available and only if not available the jar from your j2ee engine will be used.

Let us know if this helps,

Regards,

Bhavesh