6 Replies Latest reply on Mar 13, 2002 6:23 AM by malhar

    Getting ClassCastException when returning Object from sessio

    Kevin Duffey Newbie

      Hi all,

      I am running JBoss in one container, and servlet container in another. I can get the EJB no problem, call methods, even pass Object parameters no problem. But for some reason, when I try to return an Object (my own class) back from an EJB as a result, it won't let me! It keeps saying ClassCastException on the servlet container output. Actually, since its impossible right now to debug multi-tier apps, I really don't know if its the servlet container or the jboss container causing the problem. The object being returned is the same class I use to pass in as a parameter to another method which works fine. Also, if I return boolean from this method, it works fine as well. It just seems to be having a problem sending the class I need back.

      Thanks for any help.