I want to persist an Entity containing a Map.
This always fails with a NullPointer exception in the toplink code ...
If I remove the getter and setter for the map, the null pointer problem disappears.
There seems to have been a big improvement in the toplink code between b40 and b41 (at least it's got rid of one or two annoying bugs for me and the error messages are a bit more friendly)
Have you tried with b41.
I'm already removing hacks I had all over the place just to get my code to run!
BTW I have not tried a map yet as it's a legacy database that I'm coding entities for (with @JoinColumns all over the place)
Performance seems quicker too (but maybe that's just the result of me removing my hacks!)
It seems that my nullpointer happened because of the lack of a @OneToMany Annotation. Simple. But the error message was not saying anything clear, That's for sure.
I will try b41 too. Thanks for the tip. :-)
Let me add to this that the EJB Persistence PFD allows entities to contain Maps.
Oh and I am using Glassfish b40
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.