Pentaho 数据集成(最新版本)-未检测到 MySQL 驱动程序 [英] Pentaho Data Integration (newest version) - Not detecting MySQL driver

查看:67
本文介绍了Pentaho 数据集成(最新版本)-未检测到 MySQL 驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是这个工具的新手,我正在尝试创建到数据库的 MySQL 连接,但是当我按下测试"按钮时,它出现了这条消息:

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}

现在我只是运行从 pentaho 网页下载的文件夹内的应用程序文件.

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

到目前为止我所做的

我已经从 MySQL 的网页下载了最新版本的 MySQL 驱动程序.

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

我已解压缩文件并从驱动程序下载中复制了 mysql-connector-java-5.1.43-bin.jar 并尝试粘贴到 lib 文件夹中和 Data Service JDBC Driver 文件夹.

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.

我的问题是:

我应该在哪里粘贴这个驱动程序才能正确连接?

Where should I paste this driver to connect properly?

推荐答案

对于新版本的 MySQL JDBC 驱动程序(在我的例子中是 8.1 版),主驱动程序类的名称已更改.即使您下载驱动程序并重新启动spoon,Pentaho Data Integration (PDI) 的MySQL 连接器仍然会查找错误的类名.

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.

解决方法是在 PDI 中使用通用数据库"连接类型并手动添加新的类名.典型的连接细节是:

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

参考:https://jira.pentaho.com/browse/PDI-17341

这篇关于Pentaho 数据集成(最新版本)-未检测到 MySQL 驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆