java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Today I just tried to upgrade the spring lib to 1.1 rc2 from 1.02. To my surprise, the JTA starts to fail after I replaced the old spring.jar. After I switch back to 1.02, everything works again (no code change). I use spring in within SLSB CMT which is demarcated as Required, tx attribute of the spring interceptted method is PROPAGATION_REQUIRES_NEW. The call failed no matter there is a tx started by the ejb client or not. Here is the error I got with 1.1 rc2: [8/19/04 18:46:57:109 EDT] 52f8054b SystemOut U ERROR [ORB.thread.pool:2] (AbstractPlatformTransactionManager.java:521) - Rollback exception overridden by synchronization exception java.lang.NullPointerException at org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:620) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:500) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:364) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:241) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy0.logInboundRequest(Unknown Source) at [8/19/04 18:46:57:109 EDT] 52f8054b JTSXA W Current thread is already associated with another transaction. I took a look at the source and found the session object is null after executing the following line in SessionFactoryUtils. Session session = (this.jtaTransaction != null) ? this.sessionHolder.getSession(this.jtaTransaction) : this.sessionHolder.getSession(); While during the whole debug tracing, all session objects seem to bound use the DEFAULT_KEY - which is just a blank object. I'm using spring's JtaTransactionManager to set the TransactionManagerLookup, maybe there are some additional steps needed in this new version?
    via by Victor,
  • Today I just tried to upgrade the spring lib to 1.1 rc2 from 1.02. To my surprise, the JTA starts to fail after I replaced the old spring.jar. After I switch back to 1.02, everything works again (no code change). I use spring in within SLSB CMT which is demarcated as Required, tx attribute of the spring interceptted method is PROPAGATION_REQUIRES_NEW. The call failed no matter there is a tx started by the ejb client or not. Here is the error I got with 1.1 rc2: [8/19/04 18:46:57:109 EDT] 52f8054b SystemOut U ERROR [ORB.thread.pool:2] (AbstractPlatformTransactionManager.java:521) - Rollback exception overridden by synchronization exception java.lang.NullPointerException at org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:620) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:500) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:364) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:241) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy0.logInboundRequest(Unknown Source) at [8/19/04 18:46:57:109 EDT] 52f8054b JTSXA W Current thread is already associated with another transaction. I took a look at the source and found the session object is null after executing the following line in SessionFactoryUtils. Session session = (this.jtaTransaction != null) ? this.sessionHolder.getSession(this.jtaTransaction) : this.sessionHolder.getSession(); While during the whole debug tracing, all session objects seem to bound use the DEFAULT_KEY - which is just a blank object. I'm using spring's JtaTransactionManager to set the TransactionManagerLookup, maybe there are some additional steps needed in this new version?
    via by Victor,
    • java.lang.NullPointerException at org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:620) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:500) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:364) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:241) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy0.logInboundRequest(Unknown Source)
    No Bugmate found.