Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ClassNotFoundException: org.apache.xerces.SAXParser

24 views
Skip to first unread message

sdk...@sdk.sas.com

unread,
Mar 17, 2009, 11:14:14 AM3/17/09
to
Hi,

I'm having trouble deploying a webservice on WebSphere 6.1.0.17. The webservice is built using Spring Web Services and Axiom.

When I try to view the WSDL through a browser I get a ClassNotFoundException: org.apache.xerces.SAXParser (see below for full stack trace).

However I do have the xercesImpl-2.8.1.jar in my classpath (WEB-INF\lib) and my web applications classloader is set to "application class loader first". How can it be, that this class is not found? What am I missing?

Thanks,
Mikkel

Full stack trace:
[09-03-17 12:49:39:727 CET] 000049d7 WebApp E [Servlet Error]-[spring-ws]: org.springframework.ws.wsdl.WsdlDefinitionException: Could not create XMLReader; nested exception is java.lang.ClassNotFoundException: org.apache.xerces.SAXParser
at org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition.getSource(SimpleWsdl11Definition.java:76)
at org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter.getLastModified(WsdlDefinitionHandlerAdapter.java:112)
at org.springframework.ws.transport.http.MessageDispatcherServlet.getLastModified(MessageDispatcherServlet.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:739)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1075)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:550)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3391)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.lang.ClassNotFoundException: org.apache.xerces.SAXParser
at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
at org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition.getSource(SimpleWsdl11Definition.java:71)
... 25 more
---- Begin backtrace for Nested Throwables
java.lang.ClassNotFoundException: org.apache.xerces.SAXParser
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:130)
at org.xml.sax.helpers.NewInstance.newInstance(Unknown Source)
at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
at org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition.getSource(SimpleWsdl11Definition.java:71)
at org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter.getLastModified(WsdlDefinitionHandlerAdapter.java:112)
at org.springframework.ws.transport.http.MessageDispatcherServlet.getLastModified(MessageDispatcherServlet.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:739)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1075)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:550)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3391)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

Davanum Srinivas (dims)

unread,
Mar 17, 2009, 12:00:01 PM3/17/09
to
Mikkel,

Please try copy the xml-apis jar from the xerces download zip into the WEB-INF/lib as well. And let us know if that works.

-- dims

sdk...@sdk.sas.com

unread,
Mar 18, 2009, 4:47:21 AM3/18/09
to
The jar is already there, unfortunately.

All jars in web-inf\lib:

activation-1.1.jar
aopalliance-1.0.jar
axiom-api-1.2.8.jar
axiom-impl-1.2.8.jar
commons-logging-1.1.1.jar
commons-logging-9.1.3.jar
dom4j-1.6.1.jar
geronimo-activation_1.1_spec-1.0.1.jar
geronimo-javamail_1.4_spec-1.2.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
icu4j-2.6.1.jar
jaxen-1.1.jar
log4j-1.2.3-9.1.3.jar
opencsv-1.7.jar
spring-aop-2.5.6.jar
spring-beans-2.5.6.jar
spring-context-2.5.6.jar
spring-context-support-2.5.6.jar
spring-core-2.5.6.jar
spring-oxm-1.5.6.jar
spring-web-2.5.6.jar
spring-webmvc-2.5.6.jar
spring-ws-core-1.5.6.jar
spring-xml-1.5.6.jar
stax-api-1.0.1.jar
wsdl4j-1.6.1.jar
wstx-asl-3.2.4.jar
xalan-2.7.0.jar
xercesImpl-2.8.1.jar
xml-apis-1.3.04.jar
xmlParserAPIs-2.6.2.jar
xom-1.0.jar

The application works fine in my development setup (Windows, WebSphere 6.1.0.17), but gives the mentioned exception in the test environment (Aix, WebSphere 6.1.0.17).

0 new messages