Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pentaho Data Integration (newest version) - Not detecting MySQL driver

I'm new to this tool and I'm trying to create MySQL connection to a database but when I press the 'Test' button it apears this message:

Error connecting to database [MySQL (_configuracionesEF)] :org.pentaho.di.core.exception.KettleDatabaseException: 
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.
org.gjt.mm.mysql.Driver


org.pentaho.di.core.exception.KettleDatabaseException: 
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.
org.gjt.mm.mysql.Driver


at org.pentaho.di.core.database.Database.normalConnect(Database.java:472)
at org.pentaho.di.core.database.Database.connect(Database.java:370)
at org.pentaho.di.core.database.Database.connect(Database.java:341)
at org.pentaho.di.core.database.Database.connect(Database.java:331)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)
at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2783)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:597)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)
at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:43)
at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:137)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:80)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:47)
at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:116)
at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:60)
at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.editConnection(SpoonDBDelegate.java:96)
at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:3108)
at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:3043)
at org.pentaho.di.ui.spoon.Spoon.access$2300(Spoon.java:361)
at 
org.pentaho.di.ui.spoon.Spoon$26.widgetDefaultSelected(Spoon.java:6184)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1366)
at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:8022)
at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9277)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:692)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed.
org.gjt.mm.mysql.Driver

at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:515)
at org.pentaho.di.core.database.Database.normalConnect(Database.java:456)
... 53 more
Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:490)
... 54 more

Hostname       :{LOCAL_IP}
Port           :3306
Database name  :{DATABASE_NAME}

Rigth now I'm just running the application file that comes inside of the folder from the download from pentaho's webpage.


What I've done until now

I've downloaded the lastest version of the MySQL Driver from MySQL's webpage.

I've unzipped the file and copied the mysql-connector-java-5.1.43-bin.jar from the driver download and tried pasting into the lib folder and Data Service JDBC Driver folder.

My question is this:

Where should I paste this driver to connect properly?

like image 361
MikeVelazco Avatar asked Jan 03 '23 15:01

MikeVelazco


1 Answers

For the new version of the MySQL JDBC driver (in my case version 8.1), the name of the main driver class has changed. Even if you download the driver and restart spoon, still the MySQL connector of Pentaho Data Integration (PDI) looks for the wrong class name.

The workaround would be to use the "Generic database" connection type in PDI and add the new class name by hand. The typical connection details would be:

Dialect: MySQL
Custom connection URL: jdbc:mysql://localhost:3306/database_name   
Custom driver class name: com.mysql.cj.jdbc.Driver

Reference: https://jira.pentaho.com/browse/PDI-17341

like image 64
Pantelis Natsiavas Avatar answered Jan 07 '23 23:01

Pantelis Natsiavas