Jboss mysql - 没有适合的jdbc驱动程序 [英] Jboss mysql - No suitable driver found for jdbc

查看:539
本文介绍了Jboss mysql - 没有适合的jdbc驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 线程main中的异常javax.ejb.EJBException:org.hibernate。 exception.JDBCConnectionException:无法打开连接
...
...
导致:java.sql.SQLException:找不到适合jdbc的驱动程序:mysql:// localhost:3306 / db

问题类似于:其他问题,但我认为我的网址是对的!

解决方案

解决方案



我发现在stackoferflow上搜索的解决方案:)



我需要将我的mysql-connector jar文件放在jboss / server / default / lib中。
虽然我不明白它,因为我添加这个jar文件作为依赖,它被放置在lib文件夹部署。


I get following error using hibernate:

Exception in thread "main" javax.ejb.EJBException: org.hibernate.exception.JDBCConnectionException: Cannot open connection
    ...
    ...
Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/db

The problem is similar to: other question but I think my url is right!

解决方案

Solution

i found the solution searching here on stackoferflow :)

I needed to place my mysql-connector jar file into jboss/server/default/lib. Although I dont understand it since i added this jar file as a dependency and it was placed in the lib folder on deployment.

这篇关于Jboss mysql - 没有适合的jdbc驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆