facebook

Cannot Open Connection using Informix and Hibernate

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #250696 Reply

    Hi all,

    I am working with Hibernate 3 and Informix server.

    Earlier i was working with mysql database, its ok.

    But changing to informix , i got this error.

    org.hibernate.exception.GenericJDBCException: Cannot open connection
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:301)
    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
    at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
    at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)
    at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
    at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:271)
    at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1079)
    at com.pa.cricket.daoimpl.PlayerDAOImpl.getAllPlayers(PlayerDAOImpl.java:43)
    at com.pa.cricket.bl.Test.main(Test.java:29)
    Caused by: java.sql.SQLException: Transactions not supported
    at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:349)
    at com.informix.jdbc.IfxSqliConnect.setAutoCommit(IfxSqliConnect.java:1627)
    at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:112)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
    … 8 more

    My hibernate.cfg.xml file is

    <session-factory>

    <property name=”dialect”>org.hibernate.dialect.InformixDialect</property>
    <property name=”connection.driver_class”>com.informix.jdbc.IfxDriver</property>
    <property name=”connection.username”>pauser</property>
    <property name=”connection.password”>pau123</property>
    <property name=”connection.url”>jdbc:informix-sqli://172.20.51.6:17000/padb:informixserver=pasports</property>
    <property name=”show_sql”>true</property>
    <property name=”schema”>informix</property>

    <mapping resource=”com/pa/cricket/domain/Player.hbm.xml” />
    <mapping resource=”com/pa/cricket/domain/ReferenceItem.hbm.xml” />
    <mapping resource=”com/pa/cricket/domain/ReferenceType.hbm.xml” />

    </session-factory>

    Help me out plz…..

    urs
    hanif

    #250702 Reply

    Haris Peco
    Member

    Hanif,

    Your log says that ‘transactions not supported’ – this is probably jdbc driver problem – can you use some newer jdbc driver for informix

    best

    #250704 Reply

    Thanks for your information. I am using com.informix.jdbc.IfxDriver
    Is there any new informix driver available.

    Thanks in advance…

    #250705 Reply

    Haris Peco
    Member

    Hanif,

    I don’t sure, but vendor don’t change driver class – you have to find driver version
    What is your os, myeclipse and informix version, please

    Best

    #250793 Reply

    Haris Peco
    Member

    Hanif,

    This is link for latest (probably) jdbc driver for informix on ibm page http://www14.software.ibm.com/webapp/download/preconfig.jsp?id=2005-11-15+09%3A33%3A55.306246R&S_TACT=104CBW71&S_CMP=&s=

    Best

    #250808 Reply

    Thanks for your help
    Once i get the latest version, i will work on that and let you know the result.

    urs
    hanif

    #250858 Reply

    Hi,

    Hibernate 3 InformixDialect.class file do not support the Informix 9.4

    Do you have InformixDialect for Informin9.4 for Hibernate3

    I need your help

    Thanks in advance

    urs
    hanif

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Cannot Open Connection using Informix and Hibernate

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