Hey, first of all, I'm sorry for not pasting the stack - I just can't. I'm using OpenJPA 1.2.0 I have 2 classes: class A{ @OneToMany(mappedBy="a") Set } class B{ @ManyToOne A a; }
Now, at some point (I can't create a consistent testcase..) I get ClassCastException: B cannot be cast to A. The stack (typed, so sorry once again...): B.pcReplaceField() StateManagerImpl.replaceField() StateManagerImpl.storeObjectField() StateManagerImpl.storeObject() RelationFieldStrategy.load() FieldMapping.load() JDBCStoreManager.load() I'm enhancing entities at runtime, so I used decompiler to see the generated class, and in the problematic line it appears like a cast for a field. Anyone knows how can it happen (and even more interesting - how to solve the problem? :) ) Thanks, Udi -- View this message in context: http://n2.nabble.com/ClassCastException-in-pcReplaceField-tp4392185p4392185.html Sent from the OpenJPA Users mailing list archive at Nabble.com.