|
From: <leg...@at...> - 2003-09-25 21:20:56
|
Message:
The following issue has been closed.
Resolver: Gavin King
Date: Thu, 25 Sep 2003 4:19 PM
Latest CVS handles this much more elegantly.
As for multiple-transactions-per-connection, you will need to use the Hibernate transaction API for this case.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-349
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-349
Summary: NullPointerException in SessionImpl.connect under jboss
Type: Bug
Status: Closed
Priority: Minor
Resolution: DUPLICATE
Project: Hibernate2
Fix Fors:
2.1 beta 4
Versions:
2.1 beta 3
Assignee:
Reporter: toby cabot
Created: Fri, 19 Sep 2003 12:58 PM
Updated: Thu, 25 Sep 2003 4:19 PM
Environment: win2k, jboss 3.2.1, sun vm 1.4.1-b21
Description:
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
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|