JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Object Relational Mapping » Hibernate  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
己加入精華區
by koji at 2008-11-19 14:22
本主題所含的標籤
無標籤
作者 求助Hibernate連不到Informix...?? [精華]
jean320j





發文: 72
積分: 1
於 2008-11-12 12:07 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
設定如下
1
2
3
4
5
6
7
8
<property name="show_sql">true</property> 
    <property name="hibernate.dialect">org.hibernate.dialect.InformixDialect</property> 
    <property name="connection.driver_class">com.informix.jdbc.IfxDriver</property> 
    <property name="connection.url">jdbc:informix-sqli://XXXX:0000/testXXX:INFORMIXSERVER=servername</property> 
    <!-- 資料庫使用者 -->              
    <property name="connection.username">xxxxx</property> 
    <!-- 資料庫密碼 -->        
    <property name="connection.password">xxxxx</property>

錯誤如下

org.hibernate.exception.GenericJDBCException: Cannot open connection
  at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
  .
  .
  .
  .
org.hibernate.exception.GenericJDBCException: Cannot open connection
  at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  .
  .
  .
  .
  
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 com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:881)
  at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:61)
  at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
  ... 116 more

一樣的連接DB底層程式,oracle,mysql,sql200都連的到...就是Informix不行
是不是我設定檔錯誤,需要設Locale嗎我沒設定,要如何設
請幫幫忙謝謝


jean320j edited on 2008-11-12 12:11
reply to postreply to post
作者 Re:求助Hibernate連不到Informix...?? [Re:jean320j]
koji

秒速5センチメートル

站長

發文: 8415
積分: 19
於 2008-11-12 15:08 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
你必須設定informix有transaction,而且要設定成有logging

create database test in rootdbs WITH LOG MODE ANSI

這樣應該就可以了

koji


reply to postreply to post
JCConf Taiwan 2015 開始售票了!!
Facebook上的TWJUG社團,歡迎加入
作者 Re:求助Hibernate連不到Informix...?? [Re:jean320j]
jean320j





發文: 72
積分: 1
於 2008-11-12 19:23 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
還是連不到
我環境為
Hibernate 3.2
db informix 7.3
jdbc JDBC.3.50.JC2DE
jdk1.5

我用jdbc 直接連可以連的到可是用Hibernate就不行Disapproved
是不是Hibernate 不支援informix 7.3...=.=
有人連的到informix 嗎可以PO一下Hibernate的設定嗎
謝謝萬分感激


jean320j edited on 2008-11-12 19:27
reply to postreply to post
作者 Re:求助Hibernate連不到Informix...?? [Re:jean320j]
jean320j





發文: 72
積分: 1
於 2008-11-19 14:12 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
確定是informix 的transaction log 沒設定
謝謝 koji


reply to postreply to post
» JWorld@TW »  Object Relational Mapping » Hibernate

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8