NPE in LogicalConnectionImpl when multi tenancy is used without providing a release mode
manually
-------------------------------------------------------------------------------------------------
Key: HHH-7305
URL:
https://hibernate.onjira.com/browse/HHH-7305
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.1.3
Environment: cfg.setProperty(Environment.MULTI_TENANT,
MultiTenancyStrategy.DATABASE.name());
Reporter: Christian kalkhoff
Priority: Critical
When multi tenancy is used and hibernate.connection.release_mode is not set, one gets a
NPE in LogicalConnectionImpl because it accesses a (non-multi-tenancy)connection provider
to determine the release mode.
Stack trace:
java.lang.NullPointerException
at
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.determineConnectionReleaseMode(LogicalConnectionImpl.java:119)
at
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.<init>(LogicalConnectionImpl.java:100)
at
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.<init>(LogicalConnectionImpl.java:82)
at
org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.<init>(JdbcCoordinatorImpl.java:75)
at
org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.<init>(TransactionCoordinatorImpl.java:87)
at org.hibernate.internal.SessionImpl.<init>(SessionImpl.java:249)
at
org.hibernate.internal.SessionFactoryImpl$SessionBuilderImpl.openSession(SessionFactoryImpl.java:1835)
...
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira