Hibernate连接期间出错

时间:2014-04-26 07:20:47

标签: java mysql hibernate jdbc struts2

Struts问题报告

Struts has detected an unhandled exception:
Messages:   
Error! Please, check your JDBC/JDNI Configurations and Database Server avaliability. Could not open or put a Hibernate Session in ValueStack: JDBC Driver class not found: com.mysql.jdbc.driver
File:   com/googlecode/s2hibernate/struts2/plugin/interceptors/SessionTransactionInjectorInterceptor.java
Line number:    134
JDBC Driver class not found: com.mysql.jdbc.driver

我已经在lib中保存了MySQL jar并且已经检查了ref lib都是正确的请建议我解决这个问题我试图通过Hibernate注释连接db

踪迹

org.hibernate.SessionException: Error! Please, check your JDBC/JDNI Configurations and Database Server avaliability. Could not open or put a Hibernate Session in ValueStack: JDBC Driver class not found: com.mysql.jdbc.driver

1 个答案:

答案 0 :(得分:0)

您配置了错误的驱动程序类。正确的班级名称com.mysql.jdbc.Driver。请参阅使用示例here