users@jax-ws.java.net

Re: RemoteException not found in the model!

From: Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
Date: Tue, 08 Aug 2006 20:02:57 -0700

I think it is a bug. You can file a bug at
https://jax-ws.dev.java.net/servlets/ProjectIssues

Web service methods don't have to throw RemoteException as there is no
real use in throwing RemoteException. Instead, you could throw
WebServiceException.

Jitu

Greg Adams wrote:

> I'm using JAX-WS 2.0. Here's my web service implementation class:
>
> package test.services;
>
> import java.rmi.RemoteException;
>
> import javax.jws.WebMethod;
> import javax.jws.WebService ;
>
> @WebService
> public class ExceptionTest {
>
> @WebMethod
> public void testMethod() throws RemoteException {
> throw new RemoteException("Hello");
> }
>
> }
>
> After running apt and deploying to Tomcat, I'm getting the following
> stacktrace in the logs when my web method is called:
>
> SEVERE: exception class: class java.rmi.RemoteException not found in
> the model!
> exception class: class java.rmi.RemoteException not found in the model!
> at com.sun.xml.ws.encoding.soap.ServerEncoderDecoder.toInternalMessage
> (ServerEncoderDecoder.java:131)
> at
> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.setResponseInContext(SOAPMessageDispatcher.java:364)
> at
> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.getResponse
> (SOAPMessageDispatcher.java:288)
> at
> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:601)
> at
> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java
> :141)
> at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
> at
> com.sun.xml.ws.transport.http.servlet.WSServletDelegate.handle(WSServletDelegate.java:333)
> at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost
> (WSServletDelegate.java:288)
> at
> com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:77)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> 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:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
> :664)
> 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(Thread.java:595)
>
>
> Any ideas?