0 Replies Latest reply on Sep 23, 2003 9:05 AM by fhubin007

    HTTPInvoker - exception propagation problem

    fhubin007 Newbie

      Hello,

      I'm using the HTTPInvoker to make use of HTTPS as the communication protocol between a Swing based UI and JBoss.

      According to our unit testing, when an application exception is thrown on the server side, it first gets wrapped in a org.jboss.invocation.InvocationException then the resulting exception is wrapped in a java.lang.reflect.UndeclaredThrowableException (see stack trace hereafter).

      We were expecting to catch our application exception, not this java.lang.reflect.UndeclaredThrowableException.

      As long as no exception is thrown, everything is working fine.

      When we switch the protocol back to JNP, we have the expected behaviour for both invocation throwing and not throwing exception.

      Is it a bug? Did I make a mistake in the config?

      Thanks for your help/comment.

      Regards,

      Frederic.


      [java] There were 2 errors:
      [java] 1) testGetAnUnexistingInstrument(ch.swisstech.ib.test.IBManagerTest)java.lang.reflect.UndeclaredThrowableException
      [java] at $Proxy2.getInstrument(Unknown Source)
      [java] at ch.swisstech.ib.test.IBManagerTest.testGetAnUnexistingInstrument(Unknown Source)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] Caused by: org.jboss.invocation.InvocationException
      [java] at org.jboss.invocation.http.servlet.InvokerServlet.processRequest(InvokerServlet.java:142)
      [java] at org.jboss.invocation.http.servlet.InvokerServlet.doPost(InvokerServlet.java:171)
      [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      [java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      [java] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      [java] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      [java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      [java] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      [java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      [java] at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      [java] at org.jboss.jetty.Jetty.service(Jetty.java:460)
      [java] at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      [java] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      [java] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      [java] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      [java] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      [java] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      [java] 2) testServiceAssignment(ch.swisstech.ib.test.IBManagerTest)java.lang.reflect.UndeclaredThrowableException
      [java] at $Proxy2.getServiceAssignedTo(Unknown Source)
      [java] at ch.swisstech.ib.test.IBManagerTest.testServiceAssignment(Unknown Source)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] Caused by: org.jboss.invocation.InvocationException
      [java] at org.jboss.invocation.http.servlet.InvokerServlet.processRequest(InvokerServlet.java:142)
      [java] at org.jboss.invocation.http.servlet.InvokerServlet.doPost(InvokerServlet.java:171)
      [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      [java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      [java] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      [java] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      [java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      [java] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      [java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      [java] at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      [java] at org.jboss.jetty.Jetty.service(Jetty.java:460)
      [java] at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      [java] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      [java] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      [java] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      [java] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      [java] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)