Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Casting Problem in Stateful Session Beans(urgent please)

 
apurva mehta
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing a project in which I use a stateful bean in which i have a method which stores a remote reference of a stateless bean in a vector & then i used to iterate it by using java.util.Iterator class. But when i run my application i get an error that
Could not cast iterator of class pdim.SearchProdsSLBean to java.io.Serializable.
where pdim.SearchProdsSLBean is my stateful bean.

Earlier i used this same method in stateless bean & it worked very fine.But since now we use stateful beans I think that their is some problem with storing the state of Iterator.
should i insert any code in ejbPassivate() & ejb Activate()method ??
(I tried by removing iterator object in ejbPassivate() but it didnt help).
Please any one can help me regarding this.
thanx in advance.
regards
Apurva
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic