Announcement Announcement Module
Collapse
No announcement yet.
NullPointerException when using HibernateInterceptor in 1.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NullPointerException when using HibernateInterceptor in 1.1

    I seem to be getting a NullPointerException when I upgrade to 1.1rc2
    from 1.0.2. The problem seems to be linked with the new deffered
    close feature even though I'm not using the OpenSessionInViewFilter.

    I'm using a TransactionInterceptor and a HibernateInterceptor to wrap
    my businesslogic. Seems simple enough to me and it worked fine in
    1.0.2 but in 1.1rc2 I get the NullPointerException below.

    Anyone have any ideas?

    Mike

    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 $Proxy27.loadUserByUsername(Unknown Source)
    at net.sf.acegisecurity.providers.dao.DaoAuthenticati onProvider.getUserFromBackend(DaoAuthenticationPro vider.java:312)
    at net.sf.acegisecurity.providers.dao.DaoAuthenticati onProvider.authenticate(DaoAuthenticationProvider. java:193)
    at net.sf.acegisecurity.providers.ProviderManager.aut henticate(ProviderManager.java:126)
    at net.sf.acegisecurity.adapters.cas.CasPasswordHandl er.authenticate(CasPasswordHandler.java:99)
    at net.sf.acegisecurity.adapters.cas.CasPasswordHandl erProxy.authenticate(CasPasswordHandlerProxy.java: 127)
    at edu.yale.its.tp.cas.servlet.Login.doGet(Login.java :156)
    at edu.yale.its.tp.cas.servlet.Login.doPost(Login.jav a:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invo keInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.jboss.web.tomcat.security.SecurityAssociationV alve.invoke(SecurityAssociationValve.java:72)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.jboss.web.tomcat.security.JBossSecurityMgrReal m.invoke(JBossSecurityMgrRealm.java:275)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:540)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)

  • #2
    Quoting myself from the user mailing list:

    This was unfortunately a bug that slipped into 1.1 RC2. It's already been fixed in CVS for quite a while, so you might want to try a current snapshot.

    As far as I remember, this only happens with a TransactionManagerLookup in Hibernate configuration, which is strictly speaking not necessary when demarcating transactions with Spring's JtaTransactionManager. So you could also get around the problem by removing the TransactionManagerLookup key.

    Juergen

    Comment


    • #3
      Sorry for the double post. I wasn't sure I'd get any help after my "friendly reminder"

      I'll try a snapshot.

      Thanks,
      Mike

      Comment

      Working...
      X