3 Replies Latest reply on May 26, 2005 5:26 PM by Jason Greene

    Server exception not getting through to client

    mz02 Newbie

      Hi,

      I have a simple EJB web service which throws a custom ServiceException. When the exception is thrown, it doesn't seem to be created properly. I am having following error in JBOSS:

      16:44:58,812 ERROR [ServiceEndpointInterceptor] Error from service endpoint, pro
      cessing fault handler chain
      au.com.thedistillery.widget.core.ServiceException: Service Exception thrown
      at au.com.thedistillery.widget.basic.BasicWidgetStoreBean.getWidgetById(
      BasicWidgetStoreBean.java:68)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
      tatelessSessionContainer.java:214)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
      ke(CachedConnectionInterceptor.java:185)
      at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(Service
      EndpointInterceptor.java:106)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
      Interceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
      rceptor.java:105)
      at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxI
      nterceptorBMT.java:153)
      at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:6
      2)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
      elessSessionInstanceInterceptor.java:130)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
      java:139)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
      ryFinderInterceptor.java:122)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:6
      24)
      at org.jboss.ejb.Container.invoke(Container.java:873)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.webservice.server.InvokerProviderEJB.invokeServiceEndpoint(
      InvokerProviderEJB.java:131)
      at org.jboss.webservice.server.InvokerProvider.invokeMethod(InvokerProvi
      der.java:238)
      at org.jboss.axis.providers.java.RPCProvider.invokeTarget(RPCProvider.ja
      va:176)
      at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.
      java:121)
      at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:3
      58)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy
      .java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)

      at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.
      java:200)
      at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:89)

      at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:905
      )
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase
      .java:370)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
      ipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:153)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ssConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
      at java.lang.Thread.run(Thread.java:534)


      This is the web service method:
      public Widget getWidgetById(String id) throws RemoteException, ServiceException


      ServiceException extends directly java.lang.Exception.

      public class ServiceException extends Exception
      {
      public ServiceException(String message)
      {
      super(message);
      }

      public ServiceException()
      {
      super();
      }

      Can anyone give a help to the problem, why the exception is getting back to the client?

      Thanks,
      Mi

        • 1. Re: Server exception not getting through to client
          Thomas Diesler Master

          This is just logging. Is the fault message generated and propagated to the client? Does the client (if jbossws) unmarshall the fault correctly?

          • 2. Re: Server exception not getting through to client
            mz02 Newbie

             

            "thomas.diesler@jboss.com" wrote:
            This is just logging. Is the fault message generated and propagated to the client? Does the client (if jbossws) unmarshall the fault correctly?


            No. This is what happened on client side:

            java.rmi.RemoteException: Runtime exception; nested exception is:
             deserialization error: java.lang.NullPointerException
             at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:318)
             at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:300)
             at au.com.thedistillery.widget.core.WidgetStore_Stub.getWidgetById(WidgetStore_Stub.java:69)
             at BasicWidgetStoreTest.testSoapClient(BasicWidgetStoreTest.java:57)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:324)
             at junit.framework.TestCase.runTest(TestCase.java:154)
             at junit.framework.TestCase.runBare(TestCase.java:127)
             at junit.framework.TestResult$1.protect(TestResult.java:106)
             at junit.framework.TestResult.runProtected(TestResult.java:124)
             at junit.framework.TestResult.run(TestResult.java:109)
             at junit.framework.TestCase.run(TestCase.java:118)
             at junit.framework.TestSuite.runTest(TestSuite.java:208)
             at junit.framework.TestSuite.run(TestSuite.java:203)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
            Caused by: deserialization error: java.lang.NullPointerException
             at com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:130)
             at com.sun.xml.rpc.encoding.SOAPFaultInfoSerializer.deserializeDetail(SOAPFaultInfoSerializer.java:255)
             at au.com.thedistillery.widget.core.WidgetStore_getWidgetById_Fault_SOAPSerializer.deserializeDetail(WidgetStore_getWidgetById_Fault_SOAPSerializer.java:69)
             at com.sun.xml.rpc.encoding.SOAPFaultInfoSerializer.doDeserialize(SOAPFaultInfoSerializer.java:134)
             at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:192)
             at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155)
             at au.com.thedistillery.widget.core.WidgetStore_Stub._readBodyFaultElement(WidgetStore_Stub.java:141)
             at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:208)


            • 3. Re: Server exception not getting through to client
              Jason Greene Master

              at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:318)

              This class is not part of jbossws but part of the sun jax-rpc implememntation. It is probably a bug on their end.

              -Jason