facebook

Need help on Hibernate

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #225779 Reply

    jimmy2000
    Member

    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

    #225789

    Riyad Kalla
    Member

    You will need to check the documentation for your Informix DB driver and figure out what parameter turns off transaction support, then use that in your connection string.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Need help on Hibernate

You must be logged in to post in the forum log in