I have a base class (OSBBaseObject) which is extended by both Chapter and
Verse
(The mappings for the parent are defined in the OSBBaseObject)

There is a parent-child relationship between Chapter and Verse.....
(many-to-one), now when I ask the Verse for the parent Chapter (see bellow) 


asking verse for it's chapter wrote:
> 
>       public Chapter getChapter()
>       {
> 
>                 parentChapter = (Chapter) baseObj;
> 
>               return parentChapter;
>       }
> 

I recieve the folllowing exception:


The Error I get wrote:
> 
> com.me.model.OSBBaseObject$$EnhancerByCGLIB$$a602890b
> 
> java.lang.ClassCastException:
> com.me.model.OSBBaseObject$$EnhancerByCGLIB$$a602890b at
> com.me.model.Verse.getChapter(Verse.java:59) at
> com.me.dao.OsbBaseObjectDaoTest.testGetVerseAssociations(OsbBaseObjectDaoTest.java:129)
> at
> org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
> 

Thank you, 
  Andrew J. Leer
-- 
View this message in context: 
http://www.nabble.com/Question-on-class-casting-tf2863809s2369.html#a8003017
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to