使用Kettle5.0.1,安装的是MySQL5.1、JDK1.6,在\data-integration\lib目录里添加mysql的JDBC包mysql-connector-java-5.0.8-bin.jar,

在新建资源库里设置好MySQL的各种信息,如下

点“测试”报如下错误

错误连接数据库 [本地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.<init>(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

经过试验,发现出错原因是mysql的JDBC包版本选错了,改用了mysql-connector-java-5.1.30-bin.jar后就没问题了

by the way:新创建好的资源库默认【帐号:admin   密码:admin  】【帐号:guest   密码:guest】

Kettle使用MySQL作为资源库报错解决方法的更多相关文章

  1. mysql 启动 pid报错解决方法

    在安装好mysqld的时候 启动的时候报错如下: [root@ mysql]# service mysqld start Starting MySQL.The server quit without ...

  2. CentOS 7重装mysql编译过程报错解决方法

    错误记录: [ 82%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client.c.o/usr/local/ ...

  3. CentOS 7 重装mysql编译过程报错解决方法

    错误记录: [ 82%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client.c.o/usr/local/ ...

  4. eclipse创建的maven项目,pom.xml文件报错解决方法

    [错误一:]maven 编译级别过低 [解决办法:] 使用 maven-compiler-plugin 将 maven 编译级别改为 jdk1.6 以上: <!-- java编译插件 --> ...

  5. MyEclipse Server view报错解决方法

    MyEclipse Server view报错解决方法 方法/步骤     启动MyEclipse,弹出一个框,报错. ---------------------------------------- ...

  6. Loadrunner参数化逗号报错解决方法

    Loadrunner参数化逗号报错解决方法     介绍Loadrunner参数化时,参数中包含有逗号时出错的解决方法. 在Loadrunner进行参数化时,参数中如果含有逗号,编辑保存后会报错: 此 ...

  7. Android Studio support 26.0.0-alpha1 Failed to resolve: com.android.support:appcompat-v7:27.+ 报错解决方法

    AS下如何生成自定义的.jks签名文件, 以及如何生成数字签名 链接:http://www.cnblogs.com/smyhvae/p/4456420.html 链接:http://blog.csdn ...

  8. iOS url带中文下载时 报错解决方法

    问题描述:下载文件时, 请求带中文的URL的资源时,比如:http://s237.sznews.com/pic/2010/11/23/e4fa5794926548ac953a8a525a23b6f2/ ...

  9. jquery jssdk分享报错解决方法

    jssdk分享报错解决方法 一般都是参数传错了

随机推荐

  1. metasploit下Windows下多种提权方式

    前言 当你在爱害者的机器上执行一些操作时,发现有一些操作被拒绝执行,为了获得受害机器的完全权限,你需要绕过限制,获取本来没有的一些权限,这些权限可以用来删除文件,查看私有信息,或者安装特殊程序,比如病 ...

  2. js 执行顺序

    同步任务 异步任务 同步任务:立即执行 异步任务:进入到异步队列当中(Event Queue)eg:Ajax,SetTimeout,then,SetInterval Event loop 事件循环 T ...

  3. Python中的__init__和__new__

    一.__init__ 方法是什么? 使用Python写过面向对象的代码的同学,可能对 __init__ 方法已经非常熟悉了,__init__ 方法通常用在初始化一个类实例的时候.例如: # -*- c ...

  4. with(window) onload=onresize=function(){} 写法

    with(window) onload=onresize=function(){} 写法 with的用法: with(对象A) { 语句块 } 语句块中可以直接使用 对象A中的属性和方法 ------ ...

  5. ssh 免密登录

    一,单机秘密登录 进入/etc/ssh 文件夹 编辑sshd_config 文件(sshd_config是ssh 服务端文件,ssh_config是客户端文件) sudo vi sshd_config ...

  6. larave异步多图片上传的实现和注意事项及$file的对象函数

    要使用多图片上传,首先要在input添加multipart,同时注意name的参数要加[],不然,不算是数组.具体如下,注意绿色地方.如果是单张图片,把[]去掉,不要multiple; <inp ...

  7. Handler Bundle Runnable

    Handler:   不能在子线程更新UI,可以通过handler来实现在子线程发送消息在主线程更新 Bundle:      https://blog.csdn.net/qq_36895346/ar ...

  8. waitpid 函数详解

    关于Linux中waitpid函数的一些使用说明: #include<sys/types.h> #include<sys/wait.h> 定义函数 pid_t waitpid( ...

  9. Python 学习笔记6 变量-元组

    我们在上一篇中了解了变量list(列表), 今天我们来介绍下元组.元组是由括号和逗号,组织起来的一个元素的集合.和list不同的是,它其中的元素是不能被修改的,和其他语言中的常量相类似. 需要注意的是 ...

  10. Tomcat出现端口占用错误

    Several ports (8005, 8080, 8009) required by Tomcat v8.5 Server at localhost are already in use. The ...