简体   繁体   English

找不到JDeveloper MySQL错误驱动程序

[英]JDeveloper MySQL error Driver not found

I am running MySQL db using the latest wamp server. 我正在使用最新的Wamp服务器运行MySQL数据库。 Using Oracle JDeveloper 11g. 使用Oracle JDeveloper 11g。 I have placed the MySQL connector jar in .../jdeveloper/jdev/lib folder and added the jar as a library in my adf application . 我将MySQL连接器jar放置在... / jdeveloper / jdev / lib文件夹中,并将该jar作为库添加到我的adf应用程序中。 . I am able to create a connection to the db, view the tables in DB Navigator of JDev, also create Entity and View Objects. 我能够创建到数据库的连接,可以在JDev的DB Navigator中查看表,还可以创建实体和视图对象。 However when I try to run the Application Module, I get an error popup saying could not create connection, driver not found. 但是,当我尝试运行应用程序模块时,出现错误弹出窗口,提示无法创建连接,找不到驱动程序。 I have the ApplicationModule data source configuration set to JDBC Datasource. 我将ApplicationModule数据源配置设置为JDBC数据源。 Help!!! 救命!!! . Thank you 谢谢

Update : The Error Log----------------------------- 更新:错误日志--------------------------------

[232] Using the oracle.jbo.server.ConnectionPoolDataSource to acquire a connection...
[233] Creating a new pool resource
[234] Trying connection/3: url='jdbc:mysql:/*****' user='root' password='*****' ...
[235] DBTransactionImpl.initTransaction: Login failed
[236] java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/myDatabase
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:187)
at oracle.jbo.server.URLConnectionHelper.getConnectionFromDriver(URLConnectionHelper.java:50)
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:195) 
at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:166)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:580)
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:313)
at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:102)

  1. The username and password used to connect to my database is correct, I am able to test it in the connection manager. 用于连接到我的数据库的用户名和密码是正确的,我可以在连接管理器中对其进行测试。
  2. I am getting this error on run of Application Module, so I dont think the Integrated Weblogic Server is an issue here. 我在运行“应用程序模块”时遇到此错误,因此我认为集成Weblogic Server不在这里。
  3. I have made sure that in libraries the mysql-connector jar is marked as "Deploy by default". 我已确保在库中将mysql-connector jar标记为“默认部署”。

The jdbc jar file should also be placed where the embedded WebLogic can find it. 还应该将jdbc jar文件放在嵌入式WebLogic可以找到它的位置。 So locate your defaultDomain directory under the JDeveloper's system directory /users/youruser/roaming/app data/JDeveloper And locate the lib directory there. 因此,在JDeveloper的系统目录/ users / youruser / roaming / app data / JDeveloper下找到defaultDomain目录,并在其中找到lib目录。

Or make sure that the library you created in JDeveloper for the JDBC jar is marked as "Deploy by default". 或确保在JDeveloper中为JDBC jar创建的库被标记为“默认部署”。

将mysql-connector **。jar放入〜/ .jdeveloper / xxxxxxx / DefaultDomain / lib

Configure JDeveloper to work with MySQL Connector/J 配置JDeveloper以与MySQL Connector / J一起使用

1-Download MySQL Connector/J 3.0.11 and copy the JDBC driver JAR file to a known location, such as /jdev/lib 1-下载MySQL Connector / J 3.0.11 并将JDBC驱动程序JAR文件复制到已知位置,例如/ jdev / lib

From the Tools menu, select Default Project Properties. 在工具菜单上,选择默认项目属性。

In the tree view, select Libraries. 在树形视图中,选择“库”。

In the right pane, select New. 在右窗格中,选择“新建”。 The Create Library dialog will be displayed. 将显示“创建库”对话框。

Name the library MySQL JDBC. 将库命名为MySQL JDBC。

Set the location to Users Libraries. 将位置设置为“用户库”。

Click Edit for the Class Path. 单击“编辑”作为类路径。 The Edit Class Path dialog is displayed. 显示“编辑类路径”对话框。

Click Add Entry. 单击添加条目。 The Select Path Entry dialog is displayed. 显示“选择路径条目”对话框。

Navigate to the JAR file for the MySQL Connect/J JDBC driver (it should be called something like mysql-connector-java--bin.jar). 导航到MySQL Connect / J JDBC驱动程序的JAR文件(应称为mysql-connector-java--bin.jar之类)。

Click on the jar file and click Select. 单击jar文件,然后单击“选择”。 Click OK. 单击确定。

The library will be defined, and it will be in the Selected Libraries list. 该库将被定义,并将在“所选库”列表中。 You probably don't want that library to be defined in all your projects, so shuttle it over to the Available Libraries list. 您可能不希望在所有项目中都定义该库,因此将其移到“可用库”列表中。

this link help me a lot : Oracle JDeveloper 11g with MySQL 此链接对我有很大帮助: 带有MySQL的Oracle JDeveloper 11g

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM