From: <no...@at...> - 2006-05-19 15:03:28
|
NullPointerException when try to session after commit ----------------------------------------------------- Key: HHH-1769 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH= -1769 Project: Hibernate3 Type: Bug Versions: 3.1 rc3 =20 Environment: postgresql8, jboss4.0.3SP1, unix (linux, os x) Reporter: C=C3=A9dric Chantepie When trying to get entity by "load" on hibernate session, just after having= commit underlying transaction, and before closing session, a NullPointerEx= ception is thrown from Batcher (AbstractBatcher, BatchingBatcher) as connec= tionManager return a null connection so method "prepareQueryStatement" in t= his batcher cannot work. It seems ok that it should not work after commit but I think a more explici= t exception should be provided in order to make debug more easy. --- hsession.saveOrUpdate(test); tx.commit(); Test tsaved =3D hsession.load(Test.class, "pk"); // NullPointerException ra= ises here hsession.close(); --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-05-19 15:43:16
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1769?pa= ge=3Dcomments#action_23135 ]=20 Christian Bauer commented on HHH-1769: -------------------------------------- This worked perfectly fine for me last week when I was testing auto-commit = mode, so you need to provide at least, an _isolated_ and _minimal_ test tha= t shows the problem. > NullPointerException when try to session after commit > ----------------------------------------------------- > > Key: HHH-1769 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= HH-1769 > Project: Hibernate3 > Type: Bug > Versions: 3.1 rc3 > Environment: postgresql8, jboss4.0.3SP1, unix (linux, os x) > Reporter: C=C3=A9dric Chantepie > > > When trying to get entity by "load" on hibernate session, just after havi= ng commit underlying transaction, and before closing session, a NullPointer= Exception is thrown from Batcher (AbstractBatcher, BatchingBatcher) as conn= ectionManager return a null connection so method "prepareQueryStatement" in= this batcher cannot work. > It seems ok that it should not work after commit but I think a more expli= cit exception should be provided in order to make debug more easy. > --- > hsession.saveOrUpdate(test); > tx.commit(); > Test tsaved =3D hsession.load(Test.class, "pk"); // NullPointerException = raises here > hsession.close(); --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-05-19 15:45:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1769?pa= ge=3Dcomments#action_23136 ]=20 Christian Bauer commented on HHH-1769: -------------------------------------- And use a final release, not some arbitrary release candidate. > NullPointerException when try to session after commit > ----------------------------------------------------- > > Key: HHH-1769 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= HH-1769 > Project: Hibernate3 > Type: Bug > Versions: 3.1 rc3 > Environment: postgresql8, jboss4.0.3SP1, unix (linux, os x) > Reporter: C=C3=A9dric Chantepie > > > When trying to get entity by "load" on hibernate session, just after havi= ng commit underlying transaction, and before closing session, a NullPointer= Exception is thrown from Batcher (AbstractBatcher, BatchingBatcher) as conn= ectionManager return a null connection so method "prepareQueryStatement" in= this batcher cannot work. > It seems ok that it should not work after commit but I think a more expli= cit exception should be provided in order to make debug more easy. > --- > hsession.saveOrUpdate(test); > tx.commit(); > Test tsaved =3D hsession.load(Test.class, "pk"); // NullPointerException = raises here > hsession.close(); --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |