Out of blue, I started to get following exception:
http://n2.nabble.com/file/n2491173/ClassCastException.txt
ClassCastException.txt .

To the best of my understanding, problem occur when I am trying to access
@OneToMany field defined as following:

        @OneToMany(     mappedBy = "object", cascade = ALL  )
        @MapKey(name = "name")
        private Map<String,PLSRelationship> relationships;


What was particularly weird, I have quite a few objects in the data base and
this exception was happening only when I was trying to access particular 2
of these objects.  It was quite persistent too.  It always was happening
when I was trying to access these 2 particular objects.  

I was trying to figure out what was so special about these 2 objects and the
only thing I could see was that "@Version" field in records representing one
of PLSRelationship "related" to objects which were giving me an exception
were non null ( it was "1" ). On the wimp, I have reset value of all
"@Version" fields to null and now it works without any problems.

I would greatly appreciate if some one can shade some light on this issue. 
Obviously, I am doing something wrong and manage to get my data base into
state which OpenJPA did not like much.  The problem is that I have no idea
what exactly I did wrong (and how to prevent it from happening).  

You comments will be highly appreciated,

Andrei

P.S. I am running OpenJPA 1.2.0 with mySQL.  All classes are enchanted
during build time (using ant task).  
-- 
View this message in context: 
http://n2.nabble.com/Strange-%22ClassCast%22-Exception-%28and-even-stranger-way-it-disappear%29-tp2491173p2491173.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to