JDeveloper MySQL error Driver not found

怎甘沉沦 提交于 2020-01-05 03:36:49

问题


I am running MySQL db using the latest wamp server. Using 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 . . I am able to create a connection to the db, view the tables in DB Navigator of JDev, also create Entity and View Objects. 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. 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.
  3. I have made sure that in libraries the mysql-connector jar is marked as "Deploy by default".

回答1:


The jdbc jar file should also be placed where the embedded WebLogic can find it. So locate your defaultDomain directory under the JDeveloper's system directory /users/youruser/roaming/app data/JDeveloper And locate the lib directory there.

Or make sure that the library you created in JDeveloper for the JDBC jar is marked as "Deploy by default".




回答2:


put the mysql-connector**.jar in ~/.jdeveloper/xxxxxxx/DefaultDomain/lib




回答3:


Configure JDeveloper to work with 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

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.

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).

Click on the jar file and click Select. 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



来源:https://stackoverflow.com/questions/15314453/jdeveloper-mysql-error-driver-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!