cancel
Showing results for 
Search instead for 
Did you mean: 

Included Libraries Conflict -- NoSuchMethodError

Former Member
0 Kudos

Hi,

I'm trying to deploy a simple web application to the AS. The application is a web project that I imported from a WAR. The WAR works well on Tomcat v6, i.e. I can deploy it and use the implemented functionality. Furthermore, I can deploy the web project through NWDS to the AS "successfully." However, when testing the functionality I run into the following error:

#1.5.#003005A1903E003F00000003000009E80204786D9341F444#1207812241254#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#sap.com/Axis2EAR#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#Guest#205####1702a87006cf11ddced7003005a1903e#HTTP Worker [1]##0#0#Error##Plain###Processing HTTP request to servlet [AxisServlet] finished with error. The error is: java.lang.NoSuchMethodError: javax.xml.stream.XMLOutputFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/stream/XMLOutputFactory;

at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory(StAXUtils.java:97)

I have checked in several places that the XMLOutputFactory class defining the newInstance method with the above mentioned signature is available. That is, I have checked the "Web App Libraries" that are included in the project's build path and they do include a class with the above mentioned method in a JAR (stax-api-1.0.1.jar). Also, the Axis binaries (I'm using Axis2 v1.1 which corresponds to what the application I'm using to generate the WAR, Apache Muse, uses) that I'm referencing in my NWDS settings also include this JAR.

Any hints as to how and where a different version of this class gets loaded?

Cheers,

Felix

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I've found the old version of the class in a JAR that comes with the AS installation: jsr173_1.0_api.jar. This JAR includes the abstract class, while the implementation is in a JAR called sap.comtcjewebservices_libimpl.jar. How can I make sure that instead of these JARs, the WAR is packaged such that it uses the JARs that are in the project's build path?

Thank you for your help in advance.

Cheers,

Felix