Caused by: java.sql.SQLException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:398)
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:398)
at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3561)
原因:SQL语法错误。hibernate反向生成POJO的时候生成属性catalog = "wzrptdb",然后可以看到SQL语句就是from wzrptdb.wzreport.user,实际上我们需要的是from wzreport.user。
解决方法:删除catalog 属性。
纪要:在使用MySql作为数据库反向生成时,即使有catalog属性hibernate查询也一切正常,当换成informix数据库时就需要注意这一点。