linux com.mysql.jdbc.driver找不到_使用Hibernate的问题 - 找不到JDBC Driver类:com.mysql.jdbc.Driver...

使用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:

Exception constructing service 'ValueEncoderSource': Error invokingservice 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

我相信司机是在班级路上。

它可能是什么?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值