I have written an application using Seam 2.2.1 & MySQL which is working. I am now trying to connect the application to Informix and when I execute a query from hibernate(select user from User user) I am getting the following exceptions:
org.hibernate.exception.genericjdbcexception could not execute query
when i execute a query as select user.id,user.name from User user it’s executed successefuly.
The Generated sql is
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=?
The Stacktrace of exception:
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
And i Use org.hibernate.dialect.InformixDialect as hibernate.dialect
Have you an idea about the problem?
Thks For Help.
Googling for
"No such column name" informix hibernatehas led me to the following Hibernate bug report, which describes exactly the same problem: https://hibernate.onjira.com/browse/HBX-1126The solution seems to remove the parameter DELIMIDENT=y from the datasource URL.