com.nlg.dps.tpl.mgt.PostBookingManagerException: Exception while trying to retrieve booking 6

Hibernate JIRA | toby cabot | 1 decade 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

    Thanks for Hibernate, it's very nice. I'm using the version labelled "2.1beta3b" from sourceforge. I get a NullPointerException under jboss when I try to use a session where Hibernate got the connection from a DataSource. Hibernate 2.0 works fine, and 2.1beta3b works fine in a standalone JVM. My code is: Session s = hFactory.openSession(); Query q = s.createQuery("from com.nlg.dps.teo.booking.db.ItineraryLineItem as ili where ili.booking=:id and ili.origin!=ili.destination"); q.setProperties(key); List lineItems = q.list(); <-- crash site Stack trace: 11:14:13,280 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets 11:14:13,280 ERROR [STDERR] com.nlg.dps.tpl.mgt.PostBookingManagerException: Exception while trying to retrieve booking 6 11:14:13,280 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.getAirDetails(PostBookingManagerHibernate.java:665) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerEJB.getAirDetails(PostBookingManagerEJB.java:119) 11:14:13,280 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:14:13,280 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 11:14:13,280 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 11:14:13,280 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:629) 11:14:13,280 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:273) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:674) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83) 11:14:13,280 ERROR [STDERR] at $Proxy466.getAirDetails(Unknown Source) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.operationsui.businessdelegates.BookingBusinessDelegate.getAirDetails(BookingBusinessDelegate.java:100) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.operationsui.actions.RetrieveBookingFromMultipleAction.execute(RetrieveBookingFromMultipleAction.java:59) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) 11:14:13,280 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 11:14:13,280 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:863) 11:14:13,280 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:460) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) 11:14:13,295 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) 11:14:13,295 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) 11:14:13,295 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) 11:14:13,295 ERROR [STDERR] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) 11:14:13,295 ERROR [STDERR] Caused by: net.sf.hibernate.TransactionException: could not register synchronization with JTA TransactionManager 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3175) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3155) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:60) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:559) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:167) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.doFind(Loader.java:113) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.find(Loader.java:736) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:959) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1366) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:41) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.lookupAirDetails(PostBookingManagerHibernate.java:705) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.lookupAirDetails(PostBookingManagerHibernate.java:682) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.getAirDetails(PostBookingManagerHibernate.java:661) 11:14:13,295 ERROR [STDERR] ... 41 more 11:14:13,295 ERROR [STDERR] Caused by: java.lang.NullPointerException 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3171) 11:14:13,295 ERROR [STDERR] ... 53 more

    Hibernate JIRA | 1 decade ago | toby cabot
    com.nlg.dps.tpl.mgt.PostBookingManagerException: Exception while trying to retrieve booking 6
  2. 0

    Thanks for Hibernate, it's very nice. I'm using the version labelled "2.1beta3b" from sourceforge. I get a NullPointerException under jboss when I try to use a session where Hibernate got the connection from a DataSource. Hibernate 2.0 works fine, and 2.1beta3b works fine in a standalone JVM. My code is: Session s = hFactory.openSession(); Query q = s.createQuery("from com.nlg.dps.teo.booking.db.ItineraryLineItem as ili where ili.booking=:id and ili.origin!=ili.destination"); q.setProperties(key); List lineItems = q.list(); <-- crash site Stack trace: 11:14:13,280 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets 11:14:13,280 ERROR [STDERR] com.nlg.dps.tpl.mgt.PostBookingManagerException: Exception while trying to retrieve booking 6 11:14:13,280 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.getAirDetails(PostBookingManagerHibernate.java:665) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerEJB.getAirDetails(PostBookingManagerEJB.java:119) 11:14:13,280 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:14:13,280 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 11:14:13,280 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 11:14:13,280 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:629) 11:14:13,280 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:273) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:674) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83) 11:14:13,280 ERROR [STDERR] at $Proxy466.getAirDetails(Unknown Source) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.operationsui.businessdelegates.BookingBusinessDelegate.getAirDetails(BookingBusinessDelegate.java:100) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.operationsui.actions.RetrieveBookingFromMultipleAction.execute(RetrieveBookingFromMultipleAction.java:59) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) 11:14:13,280 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 11:14:13,280 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:863) 11:14:13,280 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:460) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) 11:14:13,295 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) 11:14:13,295 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) 11:14:13,295 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) 11:14:13,295 ERROR [STDERR] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) 11:14:13,295 ERROR [STDERR] Caused by: net.sf.hibernate.TransactionException: could not register synchronization with JTA TransactionManager 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3175) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3155) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:60) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:559) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:167) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.doFind(Loader.java:113) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.find(Loader.java:736) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:959) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1366) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:41) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.lookupAirDetails(PostBookingManagerHibernate.java:705) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.lookupAirDetails(PostBookingManagerHibernate.java:682) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.getAirDetails(PostBookingManagerHibernate.java:661) 11:14:13,295 ERROR [STDERR] ... 41 more 11:14:13,295 ERROR [STDERR] Caused by: java.lang.NullPointerException 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3171) 11:14:13,295 ERROR [STDERR] ... 53 more

    Hibernate JIRA | 1 decade ago | toby cabot
    com.nlg.dps.tpl.mgt.PostBookingManagerException: Exception while trying to retrieve booking 6

    Root Cause Analysis

    1. com.nlg.dps.tpl.mgt.PostBookingManagerException

      Exception while trying to retrieve booking 6

      at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.getAirDetails()
    2. com.nlg.dps
      PostBookingManagerEJB.getAirDetails
      1. com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.getAirDetails(PostBookingManagerHibernate.java:665)
      2. com.nlg.dps.tpl.mgt.ejb.PostBookingManagerEJB.getAirDetails(PostBookingManagerEJB.java:119)
      2 frames
    3. 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
    4. JBoss Application Server Server
      StatelessSessionContainer$ContainerInterceptor.invoke
      1. org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:629)
      1 frame
    5. JBoss Application Server Connector
      CachedConnectionInterceptor.invoke
      1. org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      1 frame
    6. JBoss Application Server Server
      StatelessSessionProxy.invoke
      1. org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
      2. org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      3. org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:273)
      4. org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      5. org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
      6. org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      7. org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      8. org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322)
      9. org.jboss.ejb.Container.invoke(Container.java:674)
      10. org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
      11. org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
      11 frames
    7. Unknown
      $Proxy466.getAirDetails
      1. $Proxy466.getAirDetails(Unknown Source)
      1 frame
    8. com.nlg.dps
      RetrieveBookingFromMultipleAction.execute
      1. com.nlg.dps.operationsui.businessdelegates.BookingBusinessDelegate.getAirDetails(BookingBusinessDelegate.java:100)
      2. com.nlg.dps.operationsui.actions.RetrieveBookingFromMultipleAction.execute(RetrieveBookingFromMultipleAction.java:59)
      2 frames
    9. struts
      ActionServlet.doGet
      1. org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      2. org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      3. org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      4. org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
      4 frames
    10. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2 frames
    11. Jetty Server
      ServletHandler.handle
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      2. org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      3. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      3 frames
    12. org.mortbay.http
      HttpContext.handle
      1. org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      1 frame
    13. Jetty Server
      WebApplicationContext.handle
      1. org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      1 frame
    14. org.mortbay.http
      HttpServer.service
      1. org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      2. org.mortbay.http.HttpServer.service(HttpServer.java:863)
      2 frames
    15. org.jboss.jetty
      Jetty.service
      1. org.jboss.jetty.Jetty.service(Jetty.java:460)
      1 frame
    16. org.mortbay.http
      HttpConnection.handleNext
      1. org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      2. org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      2 frames