SQL Error: 0,SQLState: S0022错误

    在使用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能够正常执行,在网上找了半天终于解决问题。

 

  原来是连接数据库驱动的问题,换了数据库连接驱动就可以了。

 

你可能感兴趣的:(SQL Error: 0,SQLState: S0022)