Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jboss mysql-未找到适合jdbc的驱动程序_Mysql_Hibernate_Jakarta Ee_Ejb - Fatal编程技术网

Jboss mysql-未找到适合jdbc的驱动程序

Jboss mysql-未找到适合jdbc的驱动程序,mysql,hibernate,jakarta-ee,ejb,Mysql,Hibernate,Jakarta Ee,Ejb,使用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/

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

问题类似于:但我认为我的url是正确的

解决方案

我在stackoferflow上找到了在此处搜索的解决方案:)

我需要将mysql连接器jar文件放入jboss/server/default/lib。
虽然我不理解它,因为我添加了这个jar文件作为依赖项,并且在部署时它被放在lib文件夹中。

解决方案

我在stackoferflow上找到了在此处搜索的解决方案:)

我需要将mysql连接器jar文件放入jboss/server/default/lib。 虽然我不理解它,因为我添加了这个jar文件作为依赖项,并且在部署时它被放在lib文件夹中