Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting javassit object instead of actual class

 
Sonam Zam
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have created a mapping bean A.java which contains java.util.Set of bean B.java,C.java and D.java.



I am fetching object of A using

A objA = (A)session.get(iAid);

After closing session when I retrieve all the fields of objA,



At #1 when I get object of B and C everything is fine.

But when I am supposed to get object of class D I get something like D__$$_javaassist_123

thus at #2 it fails the isAssignableFrom test with D.class

I have no clue why it happens only for class D.

And If I am not wrong D__$$_javaassist_123 must be sublclass of D. Then why does it fail the isAssignableFrom test.

 
Sonam Zam
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following code helped to get the actual implementation of class.



Now the isAssignableFrom test does not fail. Problem seems to be resolved. Although i m not sure if that's the best way to do it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic