Hi,
I faced a NPE at PersistentMap.get(Object key).
Code:
Caused by: java.lang.NullPointerException: null
at org.hibernate.collection.PersistentMap.get(PersistentMap.java:170) ~[hibernate-core-3.6.7.Final.jar:3.6.7.Final]
The line in question is
Code:
return result==UNKNOWN ? map.get(key) : result;
The only possible NPE is (map == null), but shouldn't this be handled internally? I have debugged the problem and can confirm that map is null at this point. I don't know the internal contract of PersistentMap, so can someone guide me how to avoid this? I will not post the complete configuration yet because it is a rather big application and I need some pointers where to look.
PersistentMap state just before the exception occurs:
Code:
cachedSize -1
directlyAccessible false
dirty false
initialized false
initializing false
key Integer (id=334)
value 50
map null
operationQueue null
owner Sample (id=580)
role "xxx.Sample.localizedName.localizedStrings" (id=235)
session SessionImpl (id=337)
storedSnapshot null