本文介绍了无法加载JDBC驱动程序类'com.postgresql.jdbc.Driver'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure HHH000342:无法获取连接到查询元数据:无法加载JDBC驱动程序类'com.postgresql.jdbc.Driver'
我在启动应用程序时收到此警告,您能帮我解决吗?这是WARN,没有错误或异常。 (它在我的maven,spring,hibernate应用程序中),当我想通过hibernate访问我的数据库时,我有异常,但我不确定这是否导致问题,谢谢。
b $ b 解决方案> 将postgresql驱动程序的依赖关系添加到 pom.xml 文件中 < dependency> < groupId> org.postgresql< / groupId> < artifactId> postgresql< / artifactId> < version> 9.3-1101-jdbc41< / version> < /依赖关系>org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure HHH000342: Could not obtain connection to query metadata : Cannot load JDBC driver class 'com.postgresql.jdbc.Driver'
I'm getting this warning while starting my application, can you help me how to solve it? It's WARN, no error or exception. (it is in my maven,spring,hibernate application), i have exceptions when i want to access my database via hibernate, but i'm not sure if this is causing the problem, thanks.
解决方案Add the dependency on the postgresql driver to your pom.xml file
<dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.3-1101-jdbc41</version> </dependency>
更多推荐
无法加载JDBC驱动程序类'com.postgresql.jdbc.Driver'
发布评论