File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes classCastException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "classCastException" Watch "classCastException" New topic


Mahesh Kulkarni
Ranch Hand

Joined: Jul 05, 2001
Posts: 62
While doing Session handling in servlets, I am facing classCastException problem.
I am referencing session bean from that servlet.
Suggetst me possible solutions to remove that exception.
Valery Anciaux
Ranch Hand

Joined: May 14, 2001
Posts: 45
Which Application server are you using ?
Looks like a class loader problem : some application servers use different class loaders for ejb and other objects.
Mahesh Kulkarni
Ranch Hand

Joined: Jul 05, 2001
Posts: 62
Hi Valery,
I'm using Weblogic App server.I'm not able to fix this problem.
Please help me.

Joined: Jul 13, 2001
Posts: 4
Need more information .. like the exact activity which is giving exception..
1. may be u are really making a mistake of casting to wrong class.
2. or the class files are not need to delete the old classfiles and rebuild( the relevent one)..
3. or if it is a bean component class remote,home or bean itself.. rebuild the bean...
I agree. Here's the link:
subject: classCastException
It's not a secret anymore!