kettle mysql 资源库_Kettle使用MySQL作为资源库报错解决方法

本文档详细介绍了在使用Kettle时遇到连接MySQL资源库错误的解决步骤。错误显示为`java.lang.NullPointerException`,在尝试通过org.gjt.mm.mysql.Driver连接到数据库时发生。该问题涉及Kettle的数据库连接过程,包括`normalConnect`、`connect`等方法。通过排查和调试,可以定位并修复连接失败的原因。
摘要由CSDN通过智能技术生成

错误连接数据库 [本地MySQL的【test】数据库] : org.pentaho.di.core.exception.KettleDatabaseException:

Error occured while trying to connect to the database

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

java.lang.NullPointerException

org.pentaho.di.core.exception.KettleDatabaseException:

Error occured while trying to connect to the database

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

java.lang.NullPointerException

at org.pentaho.di.core.database.Database.normalConnect(Database.java:415)

at org.pentaho.di.core.database.Database.connect(Database.java:353)

at org.pentaho.di.core.database.Database.connect(Database.java:306)

at org.pentaho.di.core.database.Database.connect(Database.java:294)

at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:84)

at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2459)

at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:541)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329)

at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:139)

at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:123)

at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:26)

at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:121)

at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)

at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)

at org.eclipse.swt.widgets.Widget.sendEvent(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.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:375)

at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:301)

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:62)

at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:493)

at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:478)

at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:2885)

at org.pentaho.di.ui.spoon.Spoon.access$2300(Spoon.java:332)

at org.pentaho.di.ui.spoon.Spoon$27.widgetDefaultSelected(Spoon.java:5657)

at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)

at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)

at org.eclipse.swt.widgets.Widget.sendEvent(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:1227)

at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7368)

at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:8673)

at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:625)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.pentaho.commons.launcher.Launcher.main(Launcher.java:134)

Caused by: org.pentaho.di.core.exception.KettleDatabaseException:

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

java.lang.NullPointerException

at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:540)

at org.pentaho.di.core.database.Database.normalConnect(Database.java:399)

... 45 more

Caused by: java.sql.SQLException: java.lang.NullPointerException

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)

at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:766)

at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:882)

at com.mysql.jdbc.Statement.createResultSetUsingServerFetch(Statement.java:525)

at com.mysql.jdbc.Statement.executeQuery(Statement.java:1158)

at com.mysql.jdbc.SQLError.convertShowWarningsToSQLWarnings(SQLError.java:710)

at com.mysql.jdbc.MysqlIO.scanForAndThrowDataTruncation(MysqlIO.java:3183)

at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1349)

at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:740)

at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:882)

at com.mysql.jdbc.Statement.createResultSetUsingServerFetch(Statement.java:525)

at com.mysql.jdbc.Statement.executeQuery(Statement.java:1158)

at com.mysql.jdbc.Connection.loadServerVariables(Connection.java:4478)

at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:4062)

at com.mysql.jdbc.Connection.createNewIO(Connection.java:2789)

at com.mysql.jdbc.Connection.(Connection.java:1555)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)

at java.sql.DriverManager.getConnection(DriverManager.java:579)

at java.sql.DriverManager.getConnection(DriverManager.java:221)

at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:524)

... 46 more

主机名 : localhost

端口 : 3306

数据库名:test

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值