Community
Participate
Working Groups
Build Identifier: When persisting & flushing an entity that contains a Map<String, String> I get a NPE out of Hashtable. As far as I can tell the NPE only occurs if I explicitly call flush and does not appear to be something that I can reproduce with in the junit tests provided with EclipseLink. The provided patch does solve the issue but may not be the best approach to the fix, it may be better to ensure that DirectMapContainerPolicy.next(Iterator) returns an instance of Associate instead of Map.Entry as is currently happening in my scenario. I've also attached the source entity and some sample code that illustrates what is occurring around the time that the NPE happens. I am using static weaving on my types but I don't think that matters in this case but figured I'd mention it just in case. Reproducible: Always
Created attachment 172372 [details] NPE Stack Trace
Created attachment 172373 [details] Entity class causing the NPE
Created attachment 172374 [details] Sample code that in my environment produces the error This sample code uses some other types not provided.
Created attachment 172375 [details] Patch to prevent NPE based on 2.0.2 tag
This seems to have been fixed with refactoring for 211700 in 2.1. The DirectMapContainerPolicy class no longer exists, so the patch is only valid for 2.0.2 *** This bug has been marked as a duplicate of bug 211700 ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink