Oracle Hibernate Configuration

Fixing Cannot Open Connection Issue

If you receive an error along the lines of:

org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(
at org.hibernate.exception.SQLStateConverter.convert(
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off client connection
The Connection descriptor used by the client was:

you probably need to specify the connection release mode for hibernate in your hibernate.cfg.xml file:

    <property name="hibernate.show_sql">false</property>
    <property name="hibernate.dialect"></property>

    <property name="hibernate.connection.release_mode">auto</property>

    <property name="hibernate.jdbc.use_scrollable_resultset">true</property>

    <mapping class="ca.intelliware...." />

It's only fair to share...
Share on Facebook
Tweet about this on Twitter
Share on LinkedIn

Leave a Reply