java.lang.NullPointerException

Hibernate JIRA | Anders Wallgren | 10 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The equals method in org.hibernate.util.IdentityMap.IdentityKey doesn't handle null objects: {code} java.lang.NullPointerException at org.hibernate.util.IdentityMap$IdentityKey.equals(IdentityMap.java:103) at java.util.HashMap.get(HashMap.java:305) at org.apache.commons.collections.SequencedHashMap.get(SequencedHashMap.java:288) at org.hibernate.util.IdentityMap.get(IdentityMap.java:135) at org.hibernate.engine.StatefulPersistenceContext.getEntry(StatefulPersistenceContext.java:355) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:54) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:301) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at com.electriccloud.dao.HibernateFlushListener.onFlush(HibernateFlushListener.java:49) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:575) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:651) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:621) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:311) at com.electriccloud.dao.TransactionAspect.withTransaction(TransactionAspect.java:121) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76) at com.electriccloud.operations.ConcurrentRetryAspect.performWithRetry(ConcurrentRetryAspect.java:168) at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76) at com.electriccloud.operations.OperationTimingAspect.logOperationPerformance(OperationTimingAspect.java:110) at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203) at $Proxy97.perform(Unknown Source) at com.electriccloud.operations.OperationInvoker.invoke(OperationInvoker.java:190) at com.electriccloud.operations.OperationCaller.call(OperationCaller.java:126) at com.electriccloud.operations.OperationCaller.call(OperationCaller.java:36) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) at com.electriccloud.util.queue.CommanderThread.run(CommanderThread.java:78) {code}

    Hibernate JIRA | 10 years ago | Anders Wallgren
    java.lang.NullPointerException
  2. 0

    The equals method in org.hibernate.util.IdentityMap.IdentityKey doesn't handle null objects: {code} java.lang.NullPointerException at org.hibernate.util.IdentityMap$IdentityKey.equals(IdentityMap.java:103) at java.util.HashMap.get(HashMap.java:305) at org.apache.commons.collections.SequencedHashMap.get(SequencedHashMap.java:288) at org.hibernate.util.IdentityMap.get(IdentityMap.java:135) at org.hibernate.engine.StatefulPersistenceContext.getEntry(StatefulPersistenceContext.java:355) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:54) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:301) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at com.electriccloud.dao.HibernateFlushListener.onFlush(HibernateFlushListener.java:49) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:575) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:651) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:621) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:311) at com.electriccloud.dao.TransactionAspect.withTransaction(TransactionAspect.java:121) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76) at com.electriccloud.operations.ConcurrentRetryAspect.performWithRetry(ConcurrentRetryAspect.java:168) at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76) at com.electriccloud.operations.OperationTimingAspect.logOperationPerformance(OperationTimingAspect.java:110) at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203) at $Proxy97.perform(Unknown Source) at com.electriccloud.operations.OperationInvoker.invoke(OperationInvoker.java:190) at com.electriccloud.operations.OperationCaller.call(OperationCaller.java:126) at com.electriccloud.operations.OperationCaller.call(OperationCaller.java:36) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) at com.electriccloud.util.queue.CommanderThread.run(CommanderThread.java:78) {code}

    Hibernate JIRA | 10 years ago | Anders Wallgren
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.hibernate.util.IdentityMap$IdentityKey.equals()
    2. Hibernate
      IdentityMap$IdentityKey.equals
      1. org.hibernate.util.IdentityMap$IdentityKey.equals(IdentityMap.java:103)
      1 frame
    3. Java RT
      HashMap.get
      1. java.util.HashMap.get(HashMap.java:305)
      1 frame
    4. Commons Collections
      SequencedHashMap.get
      1. org.apache.commons.collections.SequencedHashMap.get(SequencedHashMap.java:288)
      1 frame
    5. Hibernate
      IdentityMap.get
      1. org.hibernate.util.IdentityMap.get(IdentityMap.java:135)
      1 frame
    6. Hibernate
      StatefulPersistenceContext.getEntry
      1. org.hibernate.engine.StatefulPersistenceContext.getEntry(StatefulPersistenceContext.java:355)
      1 frame
    7. Hibernate
      EntityInsertAction.execute
      1. org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:54)
      1 frame
    8. Hibernate
      ActionQueue.executeActions
      1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
      2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
      3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
      3 frames
    9. Hibernate
      DefaultFlushEventListener.onFlush
      1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:301)
      2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      2 frames
    10. com.electriccloud.dao
      HibernateFlushListener.onFlush
      1. com.electriccloud.dao.HibernateFlushListener.onFlush(HibernateFlushListener.java:49)
      1 frame
    11. Hibernate
      SessionImpl.managedFlush
      1. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
      2. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
      2 frames
    12. Hibernate
      JDBCTransaction.commit
      1. org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      1 frame
    13. Hibernate
      HibernateTransactionManager.doCommit
      1. org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:575)
      1 frame
    14. Spring Tx
      TransactionAspectSupport.commitTransactionAfterReturning
      1. org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:651)
      2. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:621)
      3. org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:311)
      3 frames
    15. com.electriccloud.dao
      TransactionAspect.withTransaction
      1. com.electriccloud.dao.TransactionAspect.withTransaction(TransactionAspect.java:121)
      1 frame
    16. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    17. Spring AOP
      MethodInvocationProceedingJoinPoint.proceed
      1. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
      2. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
      3. org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      5. org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76)
      5 frames
    18. com.electriccloud.operations
      ConcurrentRetryAspect.performWithRetry
      1. com.electriccloud.operations.ConcurrentRetryAspect.performWithRetry(ConcurrentRetryAspect.java:168)
      1 frame
    19. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    20. Spring AOP
      MethodInvocationProceedingJoinPoint.proceed
      1. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
      2. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
      3. org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      5. org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76)
      5 frames
    21. com.electriccloud.operations
      OperationTimingAspect.logOperationPerformance
      1. com.electriccloud.operations.OperationTimingAspect.logOperationPerformance(OperationTimingAspect.java:110)
      1 frame
    22. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    23. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
      2. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
      3. org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      5. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
      6. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      7. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
      7 frames
    24. Unknown
      $Proxy97.perform
      1. $Proxy97.perform(Unknown Source)
      1 frame
    25. com.electriccloud.operations
      OperationCaller.call
      1. com.electriccloud.operations.OperationInvoker.invoke(OperationInvoker.java:190)
      2. com.electriccloud.operations.OperationCaller.call(OperationCaller.java:126)
      3. com.electriccloud.operations.OperationCaller.call(OperationCaller.java:36)
      3 frames
    26. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      5. java.lang.Thread.run(Thread.java:619)
      5 frames
    27. com.electriccloud.util
      CommanderThread.run
      1. com.electriccloud.util.queue.CommanderThread.run(CommanderThread.java:78)
      1 frame