• Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassCaseException from StateLess Session bean

 
Rajiv Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have declared an object(which implements java.io.Serializable) and the number of objects of that type i am putting into a Vector. I am passing the vector to a function through remote call. which accepts this vector as List and when i am trying to cast the objects in the List to its original type, i am able to typecast the first object and i am getting java.lang.ClassCastException for the rest of the objects.
One STRANGE OBSERVATION is , when i try to get the class name of the object it is returning the proper name , but when i use instanceof operator it is returing me false. What can be wrong?
 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure is a weird problem...........sounds like u are doin things all rt but for the fact that u are using a List Object to get a Vector array....even that shud not be a problem but still i wud suggest that u get a vector on the Other end also and then after u get the Object on the other end, instead of dynamic Casting, use Object.getClass().getInstance()
And keep us posted as to what went on
sure is interesting
ciao
sahil
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!