Question

Kindly I am facing a strange problem and I need your help. I am using oc4j 1013 as a java container. I had a simple web service "GetDates" and I deployed it successfuly on the oc4j and tested it by invoking the method inside it and it returns values successfully. Then I created a web service proxy using the wsdl for my web service, and I tested in from the jdeveloper and it also returned successfully. Finally I created a web application, Just an ordinary servlet to and inside it I used the web service proxy I just did previously, And tested it by running it from the jdeveloper and it returns successfully the results. The strange thing that when I decided to deploy it on an external oc4j same which is the oc4j for the web service, And call the servlet , It through the exception below.

java.lang.NoSuchMethodError: datespackage.runtime.GetDatesWS_getDateHence_ResponseStruct_LiteralSerializer.setSOAPVersion(Loracle/j2ee/ws/common/soap/SOAPVersion;)
at datespackage.runtime.GetDatesWS_getDateHence_ResponseStruct_LiteralSerializer.<init>(GetDatesWS_getDateHence_ResponseStruct_LiteralSerializer.java:37)
at datespackage.runtime.GetDatesService_SerializerRegistry.getRegistry(GetDatesService_SerializerRegistry.java:31)
at datespackage.runtime.GetDatesService_Impl.<init>(GetDatesService_Impl.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:92)
at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryImpl.java:121)
at datespackage.GetDatesWSSoapHttpPortClient.<init>(GetDatesWSSoapHttpPortClient.java:22)
at webproject.indexClass.doGet(indexClass.java:27)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)

I got the feelings that there may be a missing jar or something.

I am using JDeveloper 1013 and oc4j 1013 and I am using JDK 1.5

Was it helpful?

Solution 3

finally after long time investigation , i changed my way of calling the web service, i developed a generic client that call the web service using RPC Call . it worked fine :)

OTHER TIPS

It's unlikely that JAR is missing because class is found. It's missing particular method or signature of that method is different. Typically this happens when you have different version of same dependency (e.g. different JAR). This can happen if you have two same classes in the classpath.

Make sure that the method signatures are the same and check for package names. Client and server classes should share the same package.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top