在使用Hibernate createSQLQuery 时候执行一天简单的sql语句“select count(*) from ams_user where 1=1” 遇到如下错误
[http-80-4] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0,SQLState: S0022
[http-80-4] ERROR org.hibernate.util.JDBCExceptionReporter - Column '' not found.
很是郁闷 在debug的时候跟踪的sql 语句在mysql能够正常执行,在网上找了半天终于解决问题。
原来是连接数据库驱动的问题,换了数据库连接驱动就可以了。
本文记录了一次使用Hibernate执行简单SQL计数查询时遇到的Column '' not found.错误,并分享了通过更换数据库驱动成功解决问题的经验。
5295

被折叠的 条评论
为什么被折叠?



