HiromuHota / pentaho-kettle

webSpoon is a web-based graphical designer for Pentaho Data Integration with the same look & feel as Spoon
https://hub.docker.com/r/hiromuhota/webspoon/
Apache License 2.0
502 stars 192 forks source link

With Docker (recommended),Error occurred while trying to connect to the database #244

Open Will-He opened 3 years ago

Will-He commented 3 years ago

I want to connect MYsql database ,but Unable to connect to database。 What should I do

The error message:

Error connecting to database [mysql] :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:493)
at org.pentaho.di.core.database.Database.connect(Database.java:389)
at org.pentaho.di.core.database.Database.connect(Database.java:360)
at org.pentaho.di.core.database.Database.connect(Database.java:350)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:83)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestResults(DatabaseFactory.java:112)
at org.pentaho.di.core.database.DatabaseMeta.testConnectionSuccess(DatabaseMeta.java:2848)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:649)
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:498)
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(TypedListener.java:263)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198)
at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:869)
at org.eclipse.jface.window.Window.open(Window.java:845)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:89)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:56)
at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:115)
at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:61)
at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:495)
at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:482)
at org.pentaho.di.ui.spoon.Spoon.newConnection(Spoon.java:8953)
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:498)
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.jface.tags.JfaceMenuitem.access$100(JfaceMenuitem.java:43)
at org.pentaho.ui.xul.jface.tags.JfaceMenuitem$1.run(JfaceMenuitem.java:106)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:493)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:575)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:492)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:403)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198)
at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173)
at org.eclipse.rap.rwt.application.AbstractEntryPoint.createUI(AbstractEntryPoint.java:69)
at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:177)
at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:290)
at java.lang.Thread.run(Thread.java:748)
at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:107)

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:533)
at org.pentaho.di.core.database.Database.normalConnect(Database.java:477)
... 58 more

Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188) at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:511) ... 59 more

TofDevNet commented 3 years ago

me too

hansva commented 3 years ago

The Mysql driver is not included in the image, you have to add it as described in the readme https://github.com/HiromuHota/pentaho-kettle/blob/webspoon-9.0/README.md

Will-He commented 3 years ago

Mysql 驱动程序不包含在映像中,您必须按照自述文件https://github.com/HiromuHota/pentaho-kettle/blob/webspoon-9.0/README.md 中的描述添加它

I try。 add the mysql.jar into the $CATALINA_HOME/lib of image , but it do not work。

hansva commented 3 years ago

Hi, so the more recent versions of the mysql drivers no longer have the org.gjt.mm.mysql.Driver they changed it to com.mysql.cj.jdbc.Driver. so you either have to create a generic connection using the com.mysql.cj.jdbc.Driver class, or you need to download an older driver

TofDevNet commented 3 years ago

i try version of .jar : 5.1.47-bin , 5.1.48-bin and 5.1.49-bin

there is a new problem :

Error connecting to database [localdb] :org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database

Error connecting to database: (using class org.gjt.mm.mysql.Driver) Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database

Error connecting to database: (using class org.gjt.mm.mysql.Driver) Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

at org.pentaho.di.core.database.Database.normalConnect(Database.java:493)
at org.pentaho.di.core.database.Database.connect(Database.java:389)
at org.pentaho.di.core.database.Database.connect(Database.java:360)
at org.pentaho.di.core.database.Database.connect(Database.java:350)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:83)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestResults(DatabaseFactory.java:112)
at org.pentaho.di.core.database.DatabaseMeta.testConnectionSuccess(DatabaseMeta.java:2848)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:649)
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:498)
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(TypedListener.java:263)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198)
at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:869)
at org.eclipse.jface.window.Window.open(Window.java:845)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:89)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:56)
at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:115)
at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:61)
at org.pentaho.di.ui.trans.step.BaseStepDialog.showDbDialogUnlessCancelledOrValid(BaseStepDialog.java:813)
at org.pentaho.di.ui.trans.step.BaseStepDialog$AddConnectionListener.widgetSelected(BaseStepDialog.java:1492)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:263)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198)
at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173)
at org.pentaho.di.ui.trans.steps.tableinput.TableInputDialog.open(TableInputDialog.java:463)
at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:120)
at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:8931)
at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3431)
at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:819)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:218)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198)
at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173)
at org.eclipse.rap.rwt.application.AbstractEntryPoint.createUI(AbstractEntryPoint.java:69)
at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:177)
at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:290)
at java.lang.Thread.run(Thread.java:748)
at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:107)

Caused by: org.pentaho.di.core.exception.KettleDatabaseException: Error connecting to database: (using class org.gjt.mm.mysql.Driver) Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:601)
at org.pentaho.di.core.database.Database.normalConnect(Database.java:477)
... 58 more

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:342) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2197) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2230) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2025) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:778) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:208) at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:585) ... 59 more Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:607) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:301) ... 74 more

Hostname: 127.0.0.1 Port: 3306 Database name: cmt

hansva commented 3 years ago

This means the container can't access the database, the driver problem has been solved. If mysql is running on your local machine you will need to add port forwarding and use the IP address of your host in the docker network.

More explanation can be found here: https://stackoverflow.com/questions/44543842/how-to-connect-locally-hosted-mysql-database-with-the-docker-container/44544841

TofDevNet commented 3 years ago

thanks!! network_mode: "host" in the docker-compose !!

TofDevNet commented 3 years ago

Hi, i have a new problem : WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. Tue Aug 17 07:12:09 UTC 2021 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thank to your help !

hansva commented 3 years ago

you can add extra parameters that are added to the jdbc connection in the options tab of you connection.

xiongjy2104 commented 2 years ago

org.gjt.mm.mysql.Driver is a driver only support old version MySQL, it should be upgrade to com.mysql.cj.jdbc.Driver to support new version of MySQL

caojinlong-827 commented 2 years ago

我尝试 .jar 版本:5.1.47-bin、5.1.48-bin 和 5.1.49-bin

有一个新问题:

连接到数据库 [localdb] 时出错:org.pentaho.di.core.exception.KettleDatabaseException:尝试连接到数据库时出错

连接到数据库时出错:(使用类 org.gjt.mm.mysql.Driver) 通信链接失败

最后一个成功发送到服务器的数据包是 0 毫秒前。驱动程序没有收到来自服务器的任何数据包。

org.pentaho.di.core.exception.KettleDatabaseException: 尝试连接数据库时出错

连接到数据库时出错:(使用类 org.gjt.mm.mysql.Driver) 通信链接失败

最后一个成功发送到服务器的数据包是 0 毫秒前。驱动程序没有收到来自服务器的任何数据包。

at org.pentaho.di.core.database.Database.normalConnect(Database.java:493)
at org.pentaho.di.core.database.Database.connect(Database.java:389)
at org.pentaho.di.core.database.Database.connect(Database.java:360)
at org.pentaho.di.core.database.Database.connect(Database.java:350)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:83)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestResults(DatabaseFactory.java:112)
at org.pentaho.di.core.database.DatabaseMeta.testConnectionSuccess(DatabaseMeta.java:2848)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:649)
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:498)
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(TypedListener.java:263)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198)
at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:869)
at org.eclipse.jface.window.Window.open(Window.java:845)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:89)
at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:56)
at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:115)
at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:61)
at org.pentaho.di.ui.trans.step.BaseStepDialog.showDbDialogUnlessCancelledOrValid(BaseStepDialog.java:813)
at org.pentaho.di.ui.trans.step.BaseStepDialog$AddConnectionListener.widgetSelected(BaseStepDialog.java:1492)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:263)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198)
at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173)
at org.pentaho.di.ui.trans.steps.tableinput.TableInputDialog.open(TableInputDialog.java:463)
at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:120)
at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:8931)
at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3431)
at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:819)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:218)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:109)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:687)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:594)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1198)
at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173)
at org.eclipse.rap.rwt.application.AbstractEntryPoint.createUI(AbstractEntryPoint.java:69)
at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:177)
at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:290)
at java.lang.Thread.run(Thread.java:748)
at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:107)

引起:org.pentaho.di.core.exception.KettleDatabaseException: 连接数据库时出错:(使用类org.gjt.mm.mysql.Driver) 通信链接失败

最后一个成功发送到服务器的数据包是 0 毫秒前。驱动程序没有收到来自服务器的任何数据包。

at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:601)
at org.pentaho.di.core.database.Database.normalConnect(Database.java:477)
... 58 more

引起:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障

最后一个成功发送到服务器的数据包是 0 毫秒前。驱动程序没有收到来自服务器的任何数据包。 在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 在 java.lang.reflect.Constructor .newInstance(Constructor.java:423) 在 com.mysql.jdbc.Util.handleNewInstance(Util.java:425) 在 com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990) 在 com.mysql.jdbc。 MysqlIO.(MysqlIO.java:342) 在 com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2197) 在 com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2230) 在 com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2025) 在 com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:778) 在 com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在 sun.reflect.DelegatingConstructorAccessorImpl。 newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) 在 com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386) 在 com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330) 在 java.sql.DriverManager.getConnection(DriverManager.java:664) 在java.sql.DriverManager.getConnection(DriverManager.java:208) at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:585) ... 59 更多 原因:java.net.ConnectException: Connection 在 java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 在 java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 的 java.net.PlainSocketImpl.socketConnect(Native Method) 被拒绝(连接被拒绝) 在 java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 在 java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 在 java.net.Socket.connect(Socket.java:607) 在 com.mysql。 jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:301) ... 74 更多

主机名:127.0.0.1 端口:3306 数据库名称:cmt

In options set ssetSSL to false

SinyoWong commented 2 years ago

Hi, so the more recent versions of the mysql drivers no longer have the org.gjt.mm.mysql.Driver they changed it to com.mysql.cj.jdbc.Driver. so you either have to create a generic connection using the com.mysql.cj.jdbc.Driver class, or you need to download an older driver

Just put both mysql-connector-java-5.1.49.jar and mysql-connector-java-8.0.21.jar into $CATALINA_HOME/lib ; problem solved.