File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.util.NamespaceSupport.containsPrefix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.util.NamespaceSupport.containsPrefix" Watch "java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.util.NamespaceSupport.containsPrefix" New topic
Author

java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.util.NamespaceSupport.containsPrefix

hareesh Puthala
Greenhorn

Joined: Jan 11, 2010
Posts: 21
I am getting below error when iam trying to call webservice client class from within a servlet.
But the WSDL client is working absolutely fine as a standalone application.

Sample Code:

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
APDPRWSDLClient client = new APDPRWSDLClient();
BPEL_ThirdParty service = client.getBPEL_ThirdParty_pt();
String result = service.process(input); // Getting error in this line
}

java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.util.NamespaceSupport.containsPrefixInCurrentContext(Ljava/lang/String;)Z
at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeNamespace(XMLStreamWriterImpl.java:1018)
at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:58)
at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56)
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:313)
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:251)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
at org.codehaus.xfire.client.Client.invoke(Client.java:335)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy8.process(Unknown Source)
at com.spdcl.aponline.collection.controller.RequestListenerServlet.doGet(RequestListenerServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)

Environment Details:

JRE 1.5.0_05
TOMCAT 5.5
in the build path i have Myeclipse XFire 1.2 Core,XFire 1.2 JAXB2,XFire 1.2 HttpClient libraries.


hareesh Puthala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.util.NamespaceSupport.containsPrefix