GeeCON Prague 2014*
The moose likes Web Services and the fly likes Unable to test my webservice written in java showing Class Not Found Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Unable to test my webservice written in java showing Class Not Found Exception " Watch "Unable to test my webservice written in java showing Class Not Found Exception " New topic
Author

Unable to test my webservice written in java showing Class Not Found Exception

Gaddam Reddy
Greenhorn

Joined: Feb 09, 2011
Posts: 2
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.naresh.FirstService.Newone(FirstService.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)

This the error which iam getting , but when i try to run the same java class it is running perfectly but when iam tring to run it as a webservice and crested the client for it ,it is showing the error which is shown above .I am using axis2 and eclipse for creating the the WSDL.Please help me as i tried by running the server in debug mode and i am not able to find the error
Ravi C Kota
Ranch Hand

Joined: Jan 29, 2008
Posts: 61
Hi Gaddam,

Where do you have your jdbc related jar files in your project setup? From the exception, it seems your app could not find the necessary libraries. If your webservice is deployed in web container as a web app, the required jar files would be usually in WEB-INF/lib


Thanks & Regards, Ravi C.Kota
SCJP 5.0, OCDJWS 5.0
Gaddam Reddy
Greenhorn

Joined: Feb 09, 2011
Posts: 2
Dear ravi,
Thank you for your replay ,my driver fileas are not present in the lib folder now i copied it into lib folder it worked thanks a lot
 
GeeCON Prague 2014
 
subject: Unable to test my webservice written in java showing Class Not Found Exception