Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classCastException

 
Mahesh Kulkarni
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Mak
 
Valery Anciaux
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Valery,
I'm using Weblogic App server.I'm not able to fix this problem.
Please help me.
Thanx,
Mahesh
 
sathyaprakash
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 latest..you need to delete the old classfiles and rebuild( the relevent one)..
3. or if it is a bean component class ..like remote,home or bean itself.. rebuild the bean...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic