Title: ClassCastException when getting Home Interface from within Servlet (Jetty)

Hello all,
 
    I am running JBoss 2.2.2 and Jetty3.1 RC5. I am getting the following stacktrace after using PortableRemoteObject.narrow() and casting the return value to the expected home interface.

  **************************************************************

[Jetty] java.lang.ClassCastException: $Proxy6
[Jetty]         at main._0002fmain_0002findex_0002ejspindex_jsp_0._jspService(_0002fmain_0002findex_0002ejspindex_jsp_0.java:109)

[Jetty]         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
[Jetty]         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[Jetty]         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:176)
[Jetty]         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:307)
[Jetty]         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
[Jetty]         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[Jetty]         at com.mortbay.Jetty.Servlet.ServletHolder.handle(ServletHolder.java:488)
[Jetty]         at com.mortbay.Jetty.Servlet.ServletHandler.handle(ServletHandler.java:488)
[Jetty]         at com.mortbay.Jetty.Servlet.ServletHandler.handle(ServletHandler.java:317)
[Jetty]         at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:956)
[Jetty]         at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:913)
[Jetty]         at com.mortbay.HTTP.Handler.ResourceHandler.handleGet(ResourceHandler.java:361)
[Jetty]         at com.mortbay.HTTP.Handler.ResourceHandler.handle(ResourceHandler.java:265)
[Jetty]         at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:956)
[Jetty]         at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:913)
[Jetty]         at com.mortbay.HTTP.HttpServer.service(HttpServer.java:703)
[Jetty]         at com.mortbay.HTTP.HttpConnection.service(HttpConnection.java:508)
[Jetty]         at com.mortbay.HTTP.HttpConnection.handle(HttpConnection.java:347)
[Jetty]         at com.mortbay.HTTP.SocketListener.handleConnection(SocketListener.java:107)
[Jetty]         at com.mortbay.Util.ThreadedServer.handle(ThreadedServer.java:294)
[Jetty]         at com.mortbay.Util.ThreadPool$PoolThreadRunnable.run(ThreadPool.java:613)
[Jetty]         at java.lang.Thread.run(Thread.java:484)

***************************************************************************

  So I'm getting back the class "$Proxy6" which I'm assuming is the stub for the JBoss implementation of my home interface. This "$Proxy6" class is also what is bound in the JNDI tree to the name declared in jboss.xml.

  Here is a clue. When I try to execute the same code from a remote client through the network I have no problem. I'm thinking that this may have something to do with JBoss and Jetty living in the same JVM. What do you all think?

  I know you all are as busy as I am and I appreciate your time. Kudos to those who work on this excellent app server!!!

 -Matt Tilchen

Reply via email to