ptah
Aug 20th, 2004, 04:44 AM
Hi
First off, I would like to express gratitude for such a great framework. It sure makes my life much easier.
I am using Spring's Transaction and hibernate support with JOTM and Oracle. When I use Hibernate Template to access data in oracle via a SessionFactory, I get the following exception the first time only, After the first call, things work fine though. I do not have indepth knowledge of the spring code but suspect that it has to do with the way the sessionholder is managing sessions for jta transactions imho.
java.lang.NullPointerException
at org.springframework.orm.hibernate.SessionFactoryUt ils$SpringSessionSynchronization.beforeCommit(Sess ionFactoryUtils.java:620)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.triggerBeforeCommit(Abstr actPlatformTransactionManager.java:500)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:364)
at org.springframework.transaction.interceptor.Transa ctionAspectSupport.doCommitTransactionAfterReturni ng(TransactionAspectSupport.java:241)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:66)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :139)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:152)
at $Proxy0.add(Unknown Source)
java.lang.NullPointerException
at org.springframework.orm.hibernate.SessionFactoryUt ils.doClose(SessionFactoryUtils.java:548)
at org.springframework.orm.hibernate.SessionFactoryUt ils.closeSessionOrRegisterDeferredClose(SessionFac toryUtils.java:537)
at org.springframework.orm.hibernate.SessionFactoryUt ils.access$300(SessionFactoryUtils.java:85)
at org.springframework.orm.hibernate.SessionFactoryUt ils$SpringSessionSynchronization.beforeCompletion( SessionFactoryUtils.java:647)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.triggerBeforeCompletion(A bstractPlatformTransactionManager.java:516)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:395)
at org.springframework.transaction.interceptor.Transa ctionAspectSupport.doCommitTransactionAfterReturni ng(TransactionAspectSupport.java:241)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:66)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :139)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:152)
at $Proxy0.add(Unknown Source)
First off, I would like to express gratitude for such a great framework. It sure makes my life much easier.
I am using Spring's Transaction and hibernate support with JOTM and Oracle. When I use Hibernate Template to access data in oracle via a SessionFactory, I get the following exception the first time only, After the first call, things work fine though. I do not have indepth knowledge of the spring code but suspect that it has to do with the way the sessionholder is managing sessions for jta transactions imho.
java.lang.NullPointerException
at org.springframework.orm.hibernate.SessionFactoryUt ils$SpringSessionSynchronization.beforeCommit(Sess ionFactoryUtils.java:620)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.triggerBeforeCommit(Abstr actPlatformTransactionManager.java:500)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:364)
at org.springframework.transaction.interceptor.Transa ctionAspectSupport.doCommitTransactionAfterReturni ng(TransactionAspectSupport.java:241)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:66)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :139)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:152)
at $Proxy0.add(Unknown Source)
java.lang.NullPointerException
at org.springframework.orm.hibernate.SessionFactoryUt ils.doClose(SessionFactoryUtils.java:548)
at org.springframework.orm.hibernate.SessionFactoryUt ils.closeSessionOrRegisterDeferredClose(SessionFac toryUtils.java:537)
at org.springframework.orm.hibernate.SessionFactoryUt ils.access$300(SessionFactoryUtils.java:85)
at org.springframework.orm.hibernate.SessionFactoryUt ils$SpringSessionSynchronization.beforeCompletion( SessionFactoryUtils.java:647)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.triggerBeforeCompletion(A bstractPlatformTransactionManager.java:516)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:395)
at org.springframework.transaction.interceptor.Transa ctionAspectSupport.doCommitTransactionAfterReturni ng(TransactionAspectSupport.java:241)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:66)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :139)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:152)
at $Proxy0.add(Unknown Source)