使用hibernate连接
MySQLDB并添加数据时,我有一个非常奇怪的问题.
这是我得到的错误:
JDBC Driver class not found:
com.mysql.jdbc.Driver
这就是我的hibernate.cfg.xml的样子
/p>
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/fpa-webapp
org.hibernate.dialect.MySQLInnoDBDialect
root
update
true
true
我不明白为什么当我导航到应用程序时我看到500错误;它说找不到司机.
HTTP ERROR 500
Problem accessing /fpa-webapp/.
Reason:
06001
service builder method
org.apache.tapestry5.services.TapestryModule.buildValueEncoderSource(Map,
InvalidationEventHub) (at
TapestryModule.java:2287) (for service
‘ValueEncoderSource’): Error invoking
service contribution method
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
boolean, HibernateSessionSource,
Session, TypeCoercer, PropertyAccess,
LoggerSource): Exception constructing
service ‘HibernateSessionSource’:
Error invoking service builder method
org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionSource(Logger,
List, RegistryShutdownHub) (at
HibernateCoreModule.java:123) (for
service ‘HibernateSessionSource’):
JDBC Driver class not found:
com.mysql.jdbc.Driver
我确定司机在班级路径上.
可能是什么?