首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

class org.hibernate.exception.JDBCConnectionException

2011-11-13 
MyEclipse+struts+Hibernate问题,高手请进!用struts+hibernate实现一个简单的数据库操作的列子,出现如下错

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)


at   java.lang.Thread.run(Thread.java:595)
Caused   by:   java.sql.SQLException:   No   suitable   driver
at   java.sql.DriverManager.getConnection(DriverManager.java:545)
at   java.sql.DriverManager.getConnection(DriverManager.java:140)
at   org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at   org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
...   31   more


[解决办法]
不懂,我用jtds1.2
[解决办法]
没用过MySQL 但是问题好像是驱动不匹配的问题
[解决办法]
驱动不匹配,试试最新的
[解决办法]
估计是补丁没打,
打下sp3,和sp4
[解决办法]

Caused by: java.sql.SQLException: No suitable driver

你的驱动不对~

[解决办法]
可能是配置问题,找不到驱动吧!
[解决办法]
未找到合适的驱动
[解决办法]
有没有下sp3补丁

热点排行