我寫了一個應用程序使用Seam 2.2.1 & MySQL正在工作。現在我想將應用程序連接到Informix的,當我從執行查詢休眠(select user from User user
)我收到以下情況除外:休眠查詢問題與Informix
org.hibernate.exception.genericjdbcexception could not execute query
當我執行的select user.id,user.name from User user
它successefuly執行查詢。
生成的SQL是
select first 2 user0_.USER_ID as USER1_120_, user0_.dateOfBirth as dateOfBi2_120_, user0_.enabled as enabled120_, user0_.forename as forename120_, user0_.password as password120_, user0_.surname as surname120_, user0_.userName as userName120_ from anetidb.user user0_ where username=?
異常的堆棧跟蹤:
12:00:24,407 INFO [IntegerType] could not read column value from result set: USER1_120_; No such column name 12:00:24,665 WARN [JDBCExceptionReporter] SQL Error: -79738, SQLState: IX000 12:00:24,873 ERROR [JDBCExceptionReporter] No such column name
我用org.hibernate.dialect.InformixDialect作爲hibernate.dialect
你有關於一個想法問題?
Thks For Help。
您是否指定了適當的方言?異常的堆棧跟蹤是什麼?生成的SQL是什麼? –
異常的棧跟蹤: 12:00:24,407 INFO [IntegerType]無法從結果集中讀取列值:USER1_120_;沒有這樣的列名12:00:24,665 WARN [JDBCExceptionReporter] SQL錯誤:-79738,SQLState:IX000 12:00:24,873錯誤[JDBCExceptionReporter]沒有這樣的列名 而我使用org.hibernate.dialect.InformixDialect作爲hibernate。方言 –