IdentityHashMap在尝试放置时获取NPE

时间:2016-01-14 11:16:57

标签: java nullpointerexception hashmap eclipselink identity

我在尝试查询并调用getResult()时显然正在使用EclipseLink 2.6.0-M3

我得到这个看起来很奇怪的异常(EclipseLink代码从NPE看起来很安全),主要嫌疑人是JDK:

    **Caused by: java.lang.NullPointerException
            at java.util.IdentityHashMap.put(IdentityHashMap.java:447)**
            at org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet.addObjectChangeSet(UnitOfWorkChangeSet.java:160)
            at org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet.mergeUnitOfWorkChangeSet(UnitOfWorkChangeSet.java:510)
            at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:469)
            at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:874)
            at org.eclipse.persistence.internal.jpa.QueryImpl.performPreQueryFlush(QueryImpl.java:963)
            at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:207

)
        at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:461)

Using this Java version (IBM JDK) - 
Java(TM) SE Runtime Environment (build pxi3270sr9fp20-20151106_01(SR9 FP20))

它很少发生,所以调试在这里没有帮助。

提前致谢。

0 个答案:

没有答案