org.hibernate.exception.JDBCConnectionException: could not execute queryITeyecsdn - AG环亚娱乐

org.hibernate.exception.JDBCConnectionException: could not execute queryITeyecsdn

2019-02-06 11:39:50 | 作者: 寄南 | 标签: | 浏览: 4188

org.hibernate.exception.GenericJDBCException: could not execute queryrn at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)rn at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)rn at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)rn at org.hibernate.loader.Loader.doList(Loader.java:1596)rn at org.hibernate.loader.Loader.list(Loader.java:1577)rn at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)rn at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)rn at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)rn at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)rn at com.dp.community.dao.BasicDAO.isExistUser(BasicDAO.java:42)rn at com.dp.community.biz.BasicBO.isExistUser(BasicBO.java:34)rn at com.dp.community.action.LoginAction.executePostMethod(LoginAction.java:71)rn at com.dp.community.action.LoginAction.execute(LoginAction.java:27)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.dp.community.util.HibernateThreadFilter.doFilter(HibernateThreadFilter.java:29)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.dp.community.util.CharacterSetServlet.doFilter(CharacterSetServlet.java:55)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)rn at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)rn at java.lang.Thread.run(Thread.java:595)rnCaused by: java.sql.SQLException: Unable to convert between java.lang.Integer and TIMESTAMP.rn at net.sourceforge.jtds.jdbc.Support.convert(Support.java:558)rn at net.sourceforge.jtds.jdbc.JtdsResultSet.getTimestamp(JtdsResultSet.java:1148)rn at net.sourceforge.jtds.jdbc.JtdsResultSet.getTimestamp(JtdsResultSet.java:1300)rn at org.hibernate.type.TimestampType.get(TimestampType.java:28)rn at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:77)rn at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:68)rn at org.hibernate.type.AbstractType.hydrate(AbstractType.java:80)rn at org.hibernate.persister.entity.BasicEntityPersister.hydrate(BasicEntityPersister.java:1690)rn at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:991)rn at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:942)rn at org.hibernate.loader.Loader.getRow(Loader.java:855)rn at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305)rn at org.hibernate.loader.Loader.doQuery(Loader.java:412)rn at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)rn at org.hibernate.loader.Loader.doList(Loader.java:1593)rn ... 45 morernrnrnrnDAOrnpublic boolean isExistUser(Session session,int ghId)rn rn boolean flag = false;rn StringBuffer sb = new StringBuffer( FROM Basic AS basic WHERE basic.ghId=:ghId rn tryrn rn Query query = session.createQuery(sb.toString());rn query.setInteger( ghId ,ghId);rn [color=#FF0000]List list = query.list();[/color]//到这就报错rn if(list.size() != 0)rn rn flag = true;rn rn rn catch(Exception e)rn rn e.printStackTrace();rn rn return flag;rn rnrnrn我置疑我的MAPPING type写的有问题。不知道怎么回事,我们帮助改改吧。

版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表AG环亚娱乐立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章