Svatopluk Dedic created NETBEANS-6245:
-----------------------------------------
Summary: MySQL driver does not work out of the box
Key: NETBEANS-6245
URL: https://issues.apache.org/jira/browse/NETBEANS-6245
Project: NetBeans
Issue Type: Bug
Components: db - MySQL
Affects Versions: 12.6
Reporter: Svatopluk Dedic
Assignee: Svatopluk Dedic
The db.mysql module provides an entry for MySQL driver, but an attempt to
connect to a database will result an error (see the attached screenshot).
The JDBC driver is not shipped with the module (although it IS specified in
`external/binaries-list`) and the driver's URL is not supplied in mysql
regitration. In fact, the mysql.xml is provided by a generic DB drivers module,
but not the MySQL specific one.
The error printed to the log is
{code:java}
java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at
org.netbeans.modules.db.explorer.DbDriverManager.getDriver(DbDriverManager.java:205)
Caused: java.sql.SQLException: Unable to find a suitable driver
at
org.netbeans.modules.db.explorer.DbDriverManager.createDriverNotFoundException(DbDriverManager.java:279)
at
org.netbeans.modules.db.explorer.DbDriverManager.getDriver(DbDriverManager.java:207)
at
org.netbeans.modules.db.explorer.DbDriverManager.getDriverInternal(DbDriverManager.java:241)
at
org.netbeans.modules.db.explorer.DbDriverManager.getConnection(DbDriverManager.java:98)
at
org.netbeans.modules.db.explorer.DatabaseConnection.doConnect(DatabaseConnection.java:898)
at
org.netbeans.modules.db.explorer.DatabaseConnection.access$200(DatabaseConnection.java:78)
[catch] at
org.netbeans.modules.db.explorer.DatabaseConnection$3.run(DatabaseConnection.java:963)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
INFO [org.netbeans.modules.db.mysql.impl.ConnectManager]:
org.netbeans.api.db.explorer.DatabaseException: Unable to load JDBC
Drivercom.mysql.cj.jdbc.Driver
{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists