作者:羊鲜鸡美蟹肥 | 来源:互联网 | 2022-12-02 17:22
首先对不起我的英语
我有一个Hibernate和JPA的Maven项目。我已经注释了这些贵族。当我尝试运行程序时,显示此错误:
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.h2.Driver]
Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.h2.Driver
这是我的hibernate.cfg.xml:
org.hibernate.dialect.H2Dialect
org.h2.Driver
jdbc:h2:mem:test
sa
create-drop
false
这是我的pom.xml:
4.0.0
agilexpert
agilexpert
1.0-SNAPSHOT
javax.persistence
javax.persistence-api
2.2
com.h2database
h2
1.4.195
test
org.hibernate
hibernate-core
5.3.6.Final
我该如何解决这个问题?
1> 小智..:
在上面的pom
com.h2database
h2
1.4.195
test
去除 test