当前位置: 代码迷 >> Eclipse >>   class   org.hibernate.exception.JDBCConnectionException
  详细解决方案

  class   org.hibernate.exception.JDBCConnectionException

热度:102   发布时间:2016-04-23 14:28:21.0
MyEclipse+struts+Hibernate问题,高手请进!
用struts+hibernate实现一个简单的数据库操作的列子,出现如下错误:安装了mssqlserver   for   jdbc   ,并且把三个jar包放入到所有需要放置的地方,始终出现如下问题,请高手帮忙!!
WARN     [JDBCExceptionReporter]   SQL   Error:   0,   SQLState:   08001
17:07:07,187   ERROR   [JDBCExceptionReporter]   No   suitable   driver
17:07:07,218   WARN     [RequestProcessor]   Unhandled   Exception   thrown:   class   org.hibernate.exception.JDBCConnectionException
17:07:07,218   ERROR   [[action]]   Servlet.service()   for   servlet   action   threw   exception
org.hibernate.exception.JDBCConnectionException:   Cannot   open   connection
at   org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
at   org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at   org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at   org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
at   org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at   org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
at   org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
at   org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
at   com.yourcompany.adminBean2.loginAdmin(adminBean2.java:19)
at   com.yourcompany.struts.action.AllAdminAction.execute(AllAdminAction.java:49)
at   org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at   org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at   org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at   org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at   org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at   org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at   org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at   org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  相关解决方案