Hello Hibernate Users,
I'm currently working on a web application running on the Spring Tomcat server with an Oracle 10g Database backend. We use the app server to handle the data source connection pooling.
When the web application initially starts up, the connection to the database is great.. but after some heavy usage on the application I start seeing the following message in myapplication logs:
Quote:
2011-07-30 11:28:16.884 PDT TRACE online.tng.trustonline.sitemessages.SiteMessageServiceImpl - Begin getSiteMessage( destination[ASSET_SUMMARY])
2011-07-30 11:28:16.886 PDT WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 17008, SQLState: 08003
2011-07-30 11:28:16.886 PDT ERROR org.hibernate.util.JDBCExceptionReporter - Closed Connection
2011-07-30 11:28:16.887 PDT ERROR wellsfargo.online.framework.exception.RepositoryException - errorCode[2012], message[Exception while trying to getSiteDestination for destination[ASSET_SUMMARY], getSiteDestinationQuery[from SiteDestination as siteDestination where siteDestination.siteDestinationCode = ? or siteDestination.siteDestinationCode = ? or siteDestination.siteDestinationCode = ? or siteDestination.siteDestinationCode = ? or siteDestination.siteDestinationCode = ? or siteDestination.siteDestinationCode = ?], exceptionMessage[could not execute query]]
I tried googling these errors, but was unable to find a solution to the problem :(
SQL Error: 17008, SQLState: 08003 - means connection closed
Here's my hibernate properties:
Code:
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
hibernate.current_session_context_class=thread
hibernate.id.new_generator_mappings=true
hibernate.connection.release_mode=after_transaction
</value>
</property>
And my Spring Tomcat resource configuration:
Code:
<Resource name="jdbc/tng" auth="Container"
scope="Shareable"
type="oracle.jdbc.pool.OracleDataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
connectionCachingEnabled="true"
connectionCacheName="TNGConnectionCache"
connectionCacheProperties="{
MaxLimit=${dbMaxLimit},
MinLimit=${dbMinLimit},
InitialLimit=${dbInitialLimit},
InactivityTimeout=60,
AbandonedConnectionTimeout=60,
validateConnection=true}"
url="jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ${dbHost1})(PORT = ${dbPort1}))) (CONNECT_DATA = (SERVICE_NAME = ${dbSID})))"
user="${dbUser}"
password="${dbPasswordEncrypted}"
testOnBorrow="true"
testOnReturn="false"
validationInterval="30000"
validationQuery="select 1 from dual"/>