You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by GitBox <gi...@apache.org> on 2022/12/04 16:41:44 UTC

[GitHub] [hop] Doooing opened a new issue, #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Doooing opened a new issue, #1904:
URL: https://github.com/apache/hop/issues/1904

   ### Apache Hop version?
   
   2.1.0
   
   ### Java version?
   
   11.0.6
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   **[describe]**
   When creating a database connection, an error was reported. The mysql driver has been placed in the lib directory according to the error reporting requirements, and the hop has been restarted, but this error is still reported.
   
   mysql version : 8.0.31
   driver path: C:\Users\cai\Downloads\hop\lib\mysql-connector-java-8.0.28.jar
   
   **[error]**
   Error connecting to database [mysql_test] :org.apache.hop.core.exception.HopDatabaseException: 
   Error occurred while trying to connect to the database
   
   Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed.
   Unable to load class 'org.gjt.mm.mysql.Driver' in this classloader or in the parent
   
   
   org.apache.hop.core.exception.HopDatabaseException: 
   Error occurred while trying to connect to the database
   
   Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed.
   Unable to load class 'org.gjt.mm.mysql.Driver' in this classloader or in the parent
   
   
   	at org.apache.hop.core.database.Database.normalConnect(Database.java:330)
   	at org.apache.hop.core.database.Database.connect(Database.java:261)
   	at org.apache.hop.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:47)
   	at org.apache.hop.core.database.DatabaseFactory.getConnectionTestResults(DatabaseFactory.java:72)
   	at org.apache.hop.core.database.DatabaseMeta.testConnectionSuccess(DatabaseMeta.java:2042)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.testConnection(DatabaseMetaEditor.java:832)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.test(DatabaseMetaEditor.java:719)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.lambda$createButtonsForButtonBar$6(DatabaseMetaEditor.java:887)
   	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
   	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
   	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
   	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
   	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
   	at org.apache.hop.ui.hopgui.HopGui.open(HopGui.java:404)
   	at org.apache.hop.ui.hopgui.HopGui.main(HopGui.java:305)
   Caused by: org.apache.hop.core.exception.HopDatabaseException: 
   Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed.
   Unable to load class 'org.gjt.mm.mysql.Driver' in this classloader or in the parent
   
   	at org.apache.hop.core.database.Database.connectUsingClass(Database.java:374)
   	at org.apache.hop.core.database.Database.normalConnect(Database.java:315)
   	... 14 more
   Caused by: java.lang.ClassNotFoundException: Unable to load class 'org.gjt.mm.mysql.Driver' in this classloader or in the parent
   	at org.apache.hop.core.plugins.HopURLClassLoader.loadClass(HopURLClassLoader.java:96)
   	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
   	at org.apache.hop.core.database.Database.connectUsingClass(Database.java:349)
   	... 15 more
   Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
   	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
   	at org.apache.hop.core.plugins.HopURLClassLoader.loadClassFromThisLoader(HopURLClassLoader.java:66)
   	at org.apache.hop.core.plugins.HopURLClassLoader.loadClass(HopURLClassLoader.java:91)
   	... 17 more
   
   Hostname:	
   Port:	3306
   Database name:	wang
   Url:	localhost
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Actions


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hop] Doooing commented on issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Posted by GitBox <gi...@apache.org>.
Doooing commented on issue #1904:
URL: https://github.com/apache/hop/issues/1904#issuecomment-1336571817

   Hi @hansva , 
   Thank you for your answer, but in the database type list, there is no MySQL 8+ option, as shown in the figure.
   
   <img width="1468" alt="image" src="https://user-images.githubusercontent.com/58727869/205525476-e89da68d-8a42-4c2f-89c7-e4c144e51bcb.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hop] Doooing commented on issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Posted by GitBox <gi...@apache.org>.
Doooing commented on issue #1904:
URL: https://github.com/apache/hop/issues/1904#issuecomment-1336849358

   Hi @hansva , 
   Thank you for your answer. I just deleted the reply because of a new problem. I don't know if there is a problem with mysql driver download. If it's convenient, you can help me take a look. Thank you very much.
   
   Driver download URL:   https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.28
   
   [Current error]:
   org.apache.hop.core.exception.HopDatabaseException: 
   Error occurred while trying to connect to the database
   
   Error connecting to database: (using class com.mysql.cj.jdbc.Driver)
   No suitable driver found for localhost
   
   
   	at org.apache.hop.core.database.Database.normalConnect(Database.java:330)
   	at org.apache.hop.core.database.Database.connect(Database.java:261)
   	at org.apache.hop.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:47)
   	at org.apache.hop.core.database.DatabaseFactory.getConnectionTestResults(DatabaseFactory.java:72)
   	at org.apache.hop.core.database.DatabaseMeta.testConnectionSuccess(DatabaseMeta.java:2042)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.testConnection(DatabaseMetaEditor.java:832)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.test(DatabaseMetaEditor.java:719)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.lambda$createButtonsForButtonBar$6(DatabaseMetaEditor.java:887)
   	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
   	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
   	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
   	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
   	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
   	at org.apache.hop.ui.hopgui.HopGui.open(HopGui.java:404)
   	at org.apache.hop.ui.hopgui.HopGui.main(HopGui.java:305)
   Caused by: org.apache.hop.core.exception.HopDatabaseException: 
   Error connecting to database: (using class com.mysql.cj.jdbc.Driver)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hop] hansva closed issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Posted by GitBox <gi...@apache.org>.
hansva closed issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
URL: https://github.com/apache/hop/issues/1904


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hop] hansva commented on issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Posted by GitBox <gi...@apache.org>.
hansva commented on issue #1904:
URL: https://github.com/apache/hop/issues/1904#issuecomment-1336831750

   As you removed your comment I expect you found the solution?
   
   It's still a valid ticket I noticed the default is not set to 8+ so let's improve the UI A bit I created a task for some small improvements #1907
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hop] hansva commented on issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Posted by GitBox <gi...@apache.org>.
hansva commented on issue #1904:
URL: https://github.com/apache/hop/issues/1904#issuecomment-1336490485

   Hi @Doooing ,
   
   In the database connection you have to set the database type to MySQL 8+ , I think we changed the default in our planned next release. More information can be found in the docs https://hop.apache.org/manual/latest/database/databases/mysql.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hop] Doooing commented on issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Posted by GitBox <gi...@apache.org>.
Doooing commented on issue #1904:
URL: https://github.com/apache/hop/issues/1904#issuecomment-1336846194

   Hi @hansva , 
   Thank you for your answer. I just deleted the reply because of a new problem. I don't know if there is a problem with mysql driver download. If it's convenient, you can help me take a look. Thank you very much.
   
   Driver download URL:   https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.28
   
   [Current error]:
   org.apache.hop.core.exception.HopDatabaseException: 
   Error occurred while trying to connect to the database
   
   Error connecting to database: (using class com.mysql.cj.jdbc.Driver)
   No suitable driver found for localhost
   
   
   	at org.apache.hop.core.database.Database.normalConnect(Database.java:330)
   	at org.apache.hop.core.database.Database.connect(Database.java:261)
   	at org.apache.hop.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:47)
   	at org.apache.hop.core.database.DatabaseFactory.getConnectionTestResults(DatabaseFactory.java:72)
   	at org.apache.hop.core.database.DatabaseMeta.testConnectionSuccess(DatabaseMeta.java:2042)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.testConnection(DatabaseMetaEditor.java:832)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.test(DatabaseMetaEditor.java:719)
   	at org.apache.hop.ui.core.database.DatabaseMetaEditor.lambda$createButtonsForButtonBar$6(DatabaseMetaEditor.java:887)
   	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
   	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
   	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
   	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
   	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
   	at org.apache.hop.ui.hopgui.HopGui.open(HopGui.java:404)
   	at org.apache.hop.ui.hopgui.HopGui.main(HopGui.java:305)
   Caused by: org.apache.hop.core.exception.HopDatabaseException: 
   Error connecting to database: (using class com.mysql.cj.jdbc.Driver)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hop] hansva commented on issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Posted by GitBox <gi...@apache.org>.
hansva commented on issue #1904:
URL: https://github.com/apache/hop/issues/1904#issuecomment-1362836575

   Cannot reproduce, I downloaded the 8.0.31 driver from https://dev.mysql.com/downloads/connector/j/ (platform independent) copied it to /plugins/databases/mysql/lib and am able to conenct


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hop] hansva closed issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

Posted by GitBox <gi...@apache.org>.
hansva closed issue #1904: [Bug]: Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
URL: https://github.com/apache/hop/issues/1904


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org