日期:2014-05-16  浏览次数:20421 次

org.hibernate.exception.GenericJDBCException: could not execute query请问怎
点击下面标题查看本文完整版:org.hibernate.exception.GenericJDBCException: could not execute query请问怎么解决?

我的hibernate中的sql去不到数据库中的数据了,怎么办?
请朋友们给看一下,谢谢了
错误如下:
javax.servlet.ServletException: could not execute query
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)


root cause

org.hibernate.exception.GenericJDBCException: could not execute query
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.loader.Loader.doList(Loader.java:2148)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
org.hibernate.loader.Loader.list(Loader.java:2024)
org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
..........

请朋友帮帮我,谢谢了.

------解决方法--------------------
把查询语句贴出来看一下,应该是语句有问题吧
------解决方法--------------------
show_sql 设置为true
看下语句对不对
看现象好像是数据库驱动的问题啊