【问题标题】:Jboss mysql - No suitable driver found for jdbcJboss mysql - 找不到适合 jdbc 的驱动程序
【发布时间】:2012-01-15 03:49:55
【问题描述】:

使用休眠时出现以下错误:

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

问题类似于:other question 但我认为我的 url 是对的!

【问题讨论】:

    标签: mysql hibernate jakarta-ee ejb


    【解决方案1】:

    解决方案

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

    我需要将我的 mysql-connector jar 文件放入 jboss/server/default/lib。 虽然我不明白,因为我将此 jar 文件添加为依赖项,并且在部署时将其放置在 lib 文件夹中。

    【讨论】:

      猜你喜欢
      • 2016-04-02
      • 2012-07-14
      • 1970-01-01
      • 1970-01-01
      • 2020-07-09
      • 2016-09-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多