天天看点

Kettle连接MySQL数据库出现问题,连接不上的解决方法

本文转自it摆渡网欢迎转载,请标明出处

Kettle连接MySQL数据库出现问题,连接不上的解决方法

更多mysq文章请阅读

<a href="http://www.itbaiduwang.com/c-22.html">mysql数据库问题解决</a>

使用kettle连接mysql数据库,发生了错误,废话不多说,直接上图:

Kettle连接MySQL数据库出现问题,连接不上的解决方法

  错误信息:

  错误连接数据库 [tcc] : 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:

  at org.pentaho.di.core.database.database.normalconnect(database.java:428)

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

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

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

  at org.pentaho.di.core.database.databasefactory.getconnectiontestreport(databasefactory.java:80)

  at org.pentaho.di.core.database.databasemeta.testconnection(databasemeta.java:2686)

  at org.pentaho.ui.database.event.datahandler.testdatabaseconnection(datahandler.java:546)

  at sun.reflect.nativemethodaccessorimpl.invoke0(native method)

  at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)

  at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)

  at java.lang.reflect.method.invoke(method.java:597)

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

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

  at org.pentaho.ui.xul.swt.tags.swtdialog.show(swtdialog.java:318)

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

  at org.pentaho.di.ui.spoon.delegates.spoondbdelegate.newconnection(spoondbdelegate.java:464)

  at org.pentaho.di.ui.spoon.delegates.spoondbdelegate.newconnection(spoondbdelegate.java:451)

  at org.pentaho.di.ui.spoon.spoon.newconnection(spoon.java:8728)

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

  at org.eclipse.jface.action.actioncontributionitem.handlewidgetselection(actioncontributionitem.java:545)

  at org.eclipse.jface.action.actioncontributionitem.access$2(actioncontributionitem.java:490)

  at org.eclipse.jface.action.actioncontributionitem$5.handleevent(actioncontributionitem.java:402)

  at org.pentaho.di.ui.spoon.spoon.readanddispatch(spoon.java:1319)

  at org.pentaho.di.ui.spoon.spoon.waitfordispose(spoon.java:7939)

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

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

  at org.pentaho.commons.launcher.launcher.main(launcher.java:92)

  caused by: org.pentaho.di.core.exception.kettledatabaseexception:

  at org.pentaho.di.core.database.database.connectusingclass(database.java:522)

  at org.pentaho.di.core.database.database.connectusingclass(database.java:4697)

  at org.pentaho.di.core.database.database.normalconnect(database.java:414)

  ... 55 more

  caused by: java.lang.classnotfoundexception: org.gjt.mm.mysql.driver

  at java.net.urlclassloader$1.run(urlclassloader.java:202)

  at java.security.accesscontroller.doprivileged(native method)

  at java.net.urlclassloader.findclass(urlclassloader.java:190)

  at java.lang.classloader.loadclass(classloader.java:306)

  at java.lang.classloader.loadclass(classloader.java:247)

  at org.pentaho.di.core.database.database.connectusingclass(database.java:497)

  ... 57 more

  主机名 : 210.17.19.79

  端口 : 3306

  数据库名:test

  错误信息显示是jar包未安装,有问题找百度:

  下载jar包:mysql-connector-java-5.1.15-bin.jar

  放到kettle安装目录下:d:kettledata-integrationlib

  重启spoon.bat问题解决:

Kettle连接MySQL数据库出现问题,连接不上的解决方法