java.lang.NullPointerException

Spring JIRA | Holger Engels | 1 decade ago
  1. 0

    "GenerateLetters.java:42" calls SessionFactoryUtils.getSession(), before the adviced method "ProfileBuilderLogicSupport.java:542" is called. Problem: SessionFactoryUtils looks up the Session with SessionHolder.DEFAULT_KEY, though the Session is stored with the current transaction as key. java.lang.NullPointerException at org.springframework.orm.hibernate.HibernateTemplate.createQuery(HibernateTemplate.java:836) at org.springframework.orm.hibernate.HibernateTemplate$25.doInHibernate(HibernateTemplate.java:469) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:200) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:220) at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:467) at wilken.openshop.modules.eprofiler.dao.support.hibernate.EProfilerDaoSupport.getFavoritAttributesForBp(EProfilerDaoSupport.java:103) at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getAllFavoriteAttributes(ProfileBuilderLogicSupport.java:691) at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getEmptyFavoriteTree(ProfileBuilderLogicSupport.java:527) at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getFilledFavoriteTree(ProfileBuilderLogicSupport.java:542) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy4.getFilledFavoriteTree(Unknown Source) at wilken.openshop.modules.ecampaign.logic.support.CampaignContentBuilderSupport.getFavoriteTree(CampaignContentBuilderSupport.java:384) at wilken.openshop.modules.ecampaign.logic.support.CampaignContentBuilderSupport.buildContent(CampaignContentBuilderSupport.java:236) at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.getLocalizedContentItems(GenerateLetters.java:74) at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.createNewsletter(GenerateLetters.java:65) at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.execute(GenerateLetters.java:42) at org.concern.controller.Controller.execute(Controller.java:725) at org.concern.controller.Controller.process(Controller.java:642) at org.concern.controller.Controller.process(Controller.java:608) at org.concern.controller.Controller.timeout(Controller.java:198) at org.concern.controller.Controller$TimeoutTask.run(Controller.java:1131) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382)

    Spring JIRA | 1 decade ago | Holger Engels
    java.lang.NullPointerException
  2. 0

    "GenerateLetters.java:42" calls SessionFactoryUtils.getSession(), before the adviced method "ProfileBuilderLogicSupport.java:542" is called. Problem: SessionFactoryUtils looks up the Session with SessionHolder.DEFAULT_KEY, though the Session is stored with the current transaction as key. java.lang.NullPointerException at org.springframework.orm.hibernate.HibernateTemplate.createQuery(HibernateTemplate.java:836) at org.springframework.orm.hibernate.HibernateTemplate$25.doInHibernate(HibernateTemplate.java:469) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:200) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:220) at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:467) at wilken.openshop.modules.eprofiler.dao.support.hibernate.EProfilerDaoSupport.getFavoritAttributesForBp(EProfilerDaoSupport.java:103) at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getAllFavoriteAttributes(ProfileBuilderLogicSupport.java:691) at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getEmptyFavoriteTree(ProfileBuilderLogicSupport.java:527) at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getFilledFavoriteTree(ProfileBuilderLogicSupport.java:542) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy4.getFilledFavoriteTree(Unknown Source) at wilken.openshop.modules.ecampaign.logic.support.CampaignContentBuilderSupport.getFavoriteTree(CampaignContentBuilderSupport.java:384) at wilken.openshop.modules.ecampaign.logic.support.CampaignContentBuilderSupport.buildContent(CampaignContentBuilderSupport.java:236) at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.getLocalizedContentItems(GenerateLetters.java:74) at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.createNewsletter(GenerateLetters.java:65) at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.execute(GenerateLetters.java:42) at org.concern.controller.Controller.execute(Controller.java:725) at org.concern.controller.Controller.process(Controller.java:642) at org.concern.controller.Controller.process(Controller.java:608) at org.concern.controller.Controller.timeout(Controller.java:198) at org.concern.controller.Controller$TimeoutTask.run(Controller.java:1131) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382)

    Spring JIRA | 1 decade ago | Holger Engels
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.springframework.orm.hibernate.HibernateTemplate.createQuery()
    2. Hibernate
      HibernateTemplate.find
      1. org.springframework.orm.hibernate.HibernateTemplate.createQuery(HibernateTemplate.java:836)
      2. org.springframework.orm.hibernate.HibernateTemplate$25.doInHibernate(HibernateTemplate.java:469)
      3. org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:200)
      4. org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:220)
      5. org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:467)
      5 frames
    3. wilken.openshop.modules
      ProfileBuilderLogicSupport.getFilledFavoriteTree
      1. wilken.openshop.modules.eprofiler.dao.support.hibernate.EProfilerDaoSupport.getFavoritAttributesForBp(EProfilerDaoSupport.java:103)
      2. wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getAllFavoriteAttributes(ProfileBuilderLogicSupport.java:691)
      3. wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getEmptyFavoriteTree(ProfileBuilderLogicSupport.java:527)
      4. wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getFilledFavoriteTree(ProfileBuilderLogicSupport.java:542)
      4 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116)
      3 frames
    6. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)
      2 frames
    8. Unknown
      $Proxy4.getFilledFavoriteTree
      1. $Proxy4.getFilledFavoriteTree(Unknown Source)
      1 frame
    9. wilken.openshop.modules
      GenerateLetters.execute
      1. wilken.openshop.modules.ecampaign.logic.support.CampaignContentBuilderSupport.getFavoriteTree(CampaignContentBuilderSupport.java:384)
      2. wilken.openshop.modules.ecampaign.logic.support.CampaignContentBuilderSupport.buildContent(CampaignContentBuilderSupport.java:236)
      3. wilken.openshop.modules.ecampaign.campaign.GenerateLetters.getLocalizedContentItems(GenerateLetters.java:74)
      4. wilken.openshop.modules.ecampaign.campaign.GenerateLetters.createNewsletter(GenerateLetters.java:65)
      5. wilken.openshop.modules.ecampaign.campaign.GenerateLetters.execute(GenerateLetters.java:42)
      5 frames
    10. org.concern.controller
      Controller$TimeoutTask.run
      1. org.concern.controller.Controller.execute(Controller.java:725)
      2. org.concern.controller.Controller.process(Controller.java:642)
      3. org.concern.controller.Controller.process(Controller.java:608)
      4. org.concern.controller.Controller.timeout(Controller.java:198)
      5. org.concern.controller.Controller$TimeoutTask.run(Controller.java:1131)
      5 frames
    11. Java RT
      TimerThread.run
      1. java.util.TimerThread.mainLoop(Timer.java:432)
      2. java.util.TimerThread.run(Timer.java:382)
      2 frames