This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: classCastException
It's not a secret anymore!