Bugs item #1009873, was opened at 2004-08-16 11:04
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1009873&group_id=22866

Category: None
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Ralf Zimmermann (rz1911)
Assigned to: Nobody/Anonymous (nobody)
Summary: ClassCastException using JNDI with scoped Classloading

Initial Comment:
Hello, 

I try to access an shared object which is bount to JNDI
from two web applications within separate EARs using
scoped class loading. This results in an 
ClassCastExecption. When I try to
access the shared object from another VM everything
works fine. It also works fine if the shared object 
classes are placed in the default/lib directory. I think 
this is because there is an optimization that no remote 
calls are used within the same VM. But this optimization 
is only OK for classes loaded from the same class loader.
(The same problem seems to cause ClassCastExeptions 
if you call EJBs via remote interfaces from  diffent EARs
using scoped class loading)

To reprodurce the failure deploy the attached test files
server.ear and client.ear. Open 
http://localhost:8080/server (this creates and binds the 
shared object an sets a test value). After that open
http://localhost:8080/client (This causes the 
ClassCastException (see below).  

Source files are attachted, too.

Thanks, Ralf


2004-08-16 09:31:57,958 ERROR 
[org.jboss.web.localhost.Engine] StandardWrapperValve
[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException
        at 
com.sun.corba.se.internal.javax.rmi.PortableRemoteObjec
t.narrow(PortableRemoteObject.java:293)
        at javax.rmi.PortableRemoteObject.narrow
(PortableRemoteObject.java:134)
        at 
prs.rmi.SharedObjectFactory.getSharedObject
(SharedObjectFactory.java:38)
        at org.apache.jsp.client_jsp._jspService
(client_jsp.java:55)
        at 
org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:94)
        at javax.servlet.http.HttpServlet.service
(HttpServlet.java:810)
        at 
org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:324)
        at 
org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:292)
        at org.apache.jasper.servlet.JspServlet.service
(JspServlet.java:236)
        at javax.servlet.http.HttpServlet.service
(HttpServlet.java:810)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDo
Filter(ApplicationFilterChain.java:237)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:157)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
        at 
org.apache.catalina.core.StandardValveContext.invokeNe
xt(StandardValveContext.java:104)
        at 
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
        at 
org.apache.catalina.core.StandardContextValve.invokeIn
ternal(StandardContextValve.java:198)
        at 
org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:152)
        at 
org.apache.catalina.core.StandardValveContext.invokeNe
xt(StandardValveContext.java:104)
        at 
org.jboss.web.tomcat.security.SecurityAssociationValve.i
nvoke(SecurityAssociationValve.java:72)
        at 
org.apache.catalina.core.StandardValveContext.invokeNe
xt(StandardValveContext.java:102)
        at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.in
voke(JBossSecurityMgrRealm.java:275)
        at 
org.apache.catalina.core.StandardValveContext.invokeNe
xt(StandardValveContext.java:102)
        at 
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
        at 
org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:137)
        at 
org.apache.catalina.core.StandardValveContext.invokeNe
xt(StandardValveContext.java:104)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
        at 
org.apache.catalina.core.StandardValveContext.invokeNe
xt(StandardValveContext.java:102)
        at 
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
        at 
org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
        at 
org.apache.catalina.core.StandardValveContext.invokeNe
xt(StandardValveContext.java:104)
        at 
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
        at 
org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:929)
        at 
org.apache.coyote.tomcat5.CoyoteAdapter.service
(CoyoteAdapter.java:160)
        at 
org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:799)
        at 
org.apache.coyote.http11.Http11Protocol$Http11Connec
tionHandler.processConnection(Http11Protocol.java:705)
        at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:577)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunna
ble.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:534)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1009873&group_id=22866


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to