Hmm. With serialization this should work. Try printing out the class of
the returned object. You're
sure youre casting to the right thing?
Could rmi be using the remote codebase while tomcat is using the local
codebase??? I dont see why that
would happen.
There were some serialization issues fixed between 2.0 and 2.1-beta, but I
wouldn't think they would
affect serialization of return values in standalone mode. You could try
running current source though.
[EMAIL PROTECTED] wrote:
> Please accept apologies in advance if this is a basic/trivial question.
> I've looked at the docs and FAQs but am still confused.
>
> I'm running JBoss2.0 with Tomcat3.1.1 in Standalone mode and
> I'm getting a ClassCastException calling one of my EJB's Remote methods.
>
> The method returns several of the bean's properties in a wrapper class.
> This class is Serializable. The other methods of the EJB, which return
> Strings or
> primitives all work okay. (I have also tried putting the wrapper class
> in to an ArrayList and then casting in the Tomcat client. The remote
> method
> returns the Collection to the client, but once I try to cast its contents
> it still
> fails).
>
> I have my EJB (plus the wrapper class) in a JAR in the JBoss deploy
> directory. I
> also have the full class tree in the <context>WEB-INF/classes directory
> in Tomcat.
>
> Here's a snippet of the stack trace
>
> java.lang.ClassCastException:
> uk.co.agora.excellence.behaviour.team.model.XLBTeam
> at $Proxy14.getTeamDetails(Unknown Source)
> at
>
uk.co.agora.excellence.behaviour.team.web.XLBTeamWebImpl.performUpdate(XLBTe
amWebImpl.java:118)
>
> at
> uk.co.agora.control.web.ModelManager.notifyListeners(ModelManager.java:59)
> at
>
uk.co.agora.excellence.behaviour.control.web.XLBEventHandler.handleEvent(XLB
EventHandler.java:53)
>
> at
> uk.co.agora.control.web.EventHandler.processEvent(EventHandler.java:30)
> at
> uk.co.agora.control.web.EventHandler.processEvent(EventHandler.java:32)
> at
>
uk.co.agora.control.web.RequestProcessor.processRequest(RequestProcessor.jav
a:81)
>
> at
> uk.co.agora.control.web.MainServlet.doGet(MainServlet.java:118)
> at
> uk.co.agora.control.web.MainServlet.doPost(MainServlet.java:82)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
>
> at
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
>
> at java.lang.Thread.run(Unknown Source)
>
> If anyone can cast any light on this I'd be very grateful.
>
> Thanks,
> Syed
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
This message (including any attachments) contains confidential, proprietary
or privileged information intended for a specific purpose and individual(s),
and is protected by law. If you receive this message in error, please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender. Any unauthorized disclosure,
copying or distribution of any part of this message, or the taking of any
unauthorized action based on it, is strictly prohibited.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]