Joined: Sat Oct 18, 2008 5:06 am Posts: 1 Location: India
|
Hai to All,
I'm using Tomcat 5.5 web server and Spring+Hibernate+SQL Server in my application . I have configured my session factory to support JTA Transaction and shown hibernate.cfg.xml below for your reference. I'm using objectweb JOTM as my Transaction Manager.
While running my application after a time say 15 minutes, I'm getting exception "could not inspect JDBC autocommit mode". Also this exception is not thrown to me frequently...
Can anyone guide me to solve this exception....
Hibernate version: Hibernate 3.0.5
Spring version: Spring 1.2
Configuration documents:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.datasource">
java:comp/env/jdbc/DefaultDS
</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
</property>
<property name="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.JOTMTransactionManagerLookup
</property>
<property name="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<property name="hibernate.connection.release_mode">auto</property>
<property name="show_sql">false</property>
<property name="hbm2ddl.auto">save-update</property>
-------------
-------------
</session-factory>
</hibernate-configuration>
Full stack trace of any exception that occurs:
I really don't have full stack trace (because this error doesn't occurs frequently)...but the exception was
org.hibernate.exception.GenericJDBCException: could not inspect JDBC autocommit mode
java.sql.SQLException: Connection is closed.
Name and version of the database you are using: SQL SERVER 2005
Connection Pool:
<Resource name="jdbc/DefaultDS" auth="Container" type="javax.sql.DataSource"
factory="org.objectweb.jndi.DataSourceFactory"
username="sa"
password="admin!@#"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://192.168.1.19:1433;databaseName=karthidb;SelectMethod=cursor"
maxActive="20" maxIdle="1" removeAbandoned="true" removeAbandonedTimeout="300" validationQuery="select 1
<Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="300"/>
Thanks & Regards
Karthikeyan.
|
|