Hibernate errors are seen when trying to run reports from CABI 6.1 (Jaspersoft 6.1).

Document ID : KB000044051
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue:

After successfully running reports from CABI 6.1 (Jaspersoft 6.1) we are now receiving hibernate error messages “Socket Write Error” and “Last Packet Not Finished” and we are unable to run reports.

 

Error Message:

org.springframework.transaction. CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate. TransactionException: JDBC being failed:

 

Error Message:

org.hibernate.TransactionException: JDBC begin failed:

 

or

 

Error Message:

org.springframework.tranaction. CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.AssertionError: Last packet not finished

 

Error Message:

java.lang.AssertionError: Last packet not finished

 

Environment:

 

Spectrum 10.1.1

Jaspersoft 6.1

 

Cause:

c3p0 hibernation settings have been removed by the vendor

 

Resolution:

 

Please add property key values shown below which are in bold letters in hibernateProperties in <js-app>/jasperserver-pro/WEB-INF/applicationContext.xml file

 

 

<property name="hibernateProperties">

      <props>

        <prop key="hibernate.dialect">${metadata.hibernate.dialect}</prop>

        <prop key="hibernate.show_sql">false</prop>

        <prop key="hibernate.generate_statistics">true</prop>

        <!--uncomment property below if a default schema should be specified such as for DB2-->

        <!--<prop key="hibernate.default_schema">${metadata.hibernate.default_schema}</prop>-->

        <!--Cache Configurations-->

        <prop key="hibernate.cache.region.factory_class">${hibernate.cache.region.factory_class}</prop>

        <prop key="net.sf.ehcache.configurationResourceName">/ehcache_hibernate.xml</prop>

        <prop key="hibernate.cache.use_minimal_puts">false</prop>

        <prop key="hibernate.cache.use_query_cache">true</prop>

        <prop key="hibernate.jdbc.batch_size">20</prop>

        <prop key="hibernate.cache.use_second_level_cache">true</prop>

        <prop key="hibernate.cache.use_structured_entries">true</prop>

         <prop key="hibernate.c3p0.min_size">5</prop>

         <prop key="hibernate.c3p0.max_size">200</prop>

         <prop key="hibernate.c3p0.timeout">300</prop>

         <prop key="hibernate.c3p0.max_statements">500</prop>

         <prop key="hibernate.c3p0.idle_test_period">60</prop>

         <prop key="hibernate.c3p0.acquire_increment">2</prop>

         <prop key="hibernate.c3p0.testConnectionOnCheckin">true</prop>

      </props>

    </property>

 

 

A restart of the CABI 6.1 Tomcat is required for these settings to go into effect.