Hi, there
New and try to go through the tutorial about the Hibernate. I am using Informix db ver9, and our db was setup without any transaction loggings. In other words, maybe not supporting transaction. When I try to run the tutorial example, I got:
net.sf.hibernate.exception.GenericJDBCException: Cannot open connection
at net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:81)
at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30)
at net.sf.hibernate.impl.BatcherImpl.convert(BatcherImpl.java:325)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:292)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3361)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3321)
at com.genuitec.hibernate.HibernateTest.main(HibernateTest.java:21)
Caused by: java.sql.SQLException: Transactions not supported
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:348)
at com.informix.jdbc.IfxSqliConnect.setAutoCommit(IfxSqliConnect.java:1454)
at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:103)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:289)
… 3 more
I think there should be a easy way, say, in the config file to turn off the transactions, I tried adding: session.connection().setAutoCommit(true); into the HibernateTest.java, but still won’t work.
Thanks in advance.
Jimmy