我是靠谱客的博主 冷傲小虾米,最近开发中收集的这篇文章主要介绍org.springframework.dao.DataAccessResourceFailureException: could not execute query; nested exceptio,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
遇到一个问题,连的两个数据源,其中一个数据源在请求的的时候出现一下报错:
org.springframework.dao.DataAccessResourceFailureException: could not execute query; nested exception is org.hibernate.exception.JDBCConnectionException: could not execute query
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:625)org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
com.ivo.core.HibernateCaller.find(HibernateCaller.java:109)
com.ivo.security.contract.ContractServiceold.searchDepartment(ContractServiceold.java:22)
com.ivo.security.contract.ContractServiceold$$FastClassByCGLIB$$dd47922b.invoke(<generated>)
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:617)
com.ivo.security.contract.ContractServiceold$$EnhancerByCGLIB$$c9aea004.searchDepartment(<generated>)
com.ivo.security.contract.ContractController.findDepartment(ContractController.java:78)
sun.reflect.GeneratedMethodAccessor361.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
stackoverflow上说要把driver放到tomcat下而不是war包里。我去试试哈~~
最后
以上就是冷傲小虾米为你收集整理的org.springframework.dao.DataAccessResourceFailureException: could not execute query; nested exceptio的全部内容,希望文章能够帮你解决org.springframework.dao.DataAccessResourceFailureException: could not execute query; nested exceptio所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复