0 Replies Latest reply on Oct 25, 2012 2:44 PM by Jeff Bride

    handling of RuntimeException in a BeanService

    Jeff Bride Novice

      Hi,

         it appears that a RuntimeException is *somewhat* buried when thrown in a BeanService.

         for more clarification, please add the following at the top of the submitOrder( ....) function in org.switchyard.quickstarts.bean.service.OrderServiceBean :

       

      if(true)
          throw new RuntimeException();
      

       

      what is not logged to server.log is this actual RuntimException with stacktrace.

       

      instead, what is logged is:

       

      13:57:00,130 ERROR [org.jboss.ws.common.invocation.InvocationHandlerJAXWS] Method invocation failed with exception: null: java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_05-icedtea]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_05-icedtea]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_05-icedtea]
              at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_05-icedtea]
              at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)
              at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)
              at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_05-icedtea]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_05-icedtea]
              at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_05-icedtea]
              at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
              at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
              at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)
              at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)
              at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
              at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
              at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.3.GA.jar:2.0.3.GA]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
              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:368)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05-icedtea]
      Caused by: org.switchyard.exception.SwitchYardException
              at org.switchyard.component.soap.InboundHandler.invoke(InboundHandler.java:223) [switchyard-component-soap-0.6.0-SNAPSHOT.jar:0.6.0-SNAPSHOT]
              at org.switchyard.component.soap.endpoint.BaseWebService.invoke(BaseWebService.java:113) [switchyard-component-soap-0.6.0-SNAPSHOT.jar:0.6.0-SNAPSHOT]
              at org.switchyard.component.soap.endpoint.BaseWebService.invoke(BaseWebService.java:43) [switchyard-component-soap-0.6.0-SNAPSHOT.jar:0.6.0-SNAPSHOT]
      

       

       

      so given this log, it's at least clear that something went wrong.  however, it would be great if the stackTrace of the root problem was logged.

       

      thanks!  jeff