NullPointerException when try to session after commit

Description

When trying to get entity by "load" on hibernate session, just after having commit underlying transaction, and before closing session, a NullPointerException is thrown from Batcher (AbstractBatcher, BatchingBatcher) as connectionManager 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 explicit exception should be provided in order to make debug more easy.

hsession.saveOrUpdate(test);

tx.commit();

Test tsaved = hsession.load(Test.class, "pk"); // NullPointerException raises here

hsession.close();

Environment

postgresql8, jboss4.0.3SP1, unix (linux, os x)

Assignee

Unassigned

Reporter

Cédric Chantepie

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure