Kettle串連Mysql資料庫異常

來源:互聯網
上載者:User

環境:

Kettle:kettle-spoon 版本stable release -4.3.0

Mysql:MySQL Server 5.5

 資料庫連接資訊:

 測試資料庫連接情況。

 

 

錯誤串連資料庫 [MySql-1] :org.pentaho.di.core.exception.KettleDatabaseException:

Erroroccured while trying to connect to the database

 

Exceptionwhile loading class

org.gjt.mm.mysql.Driver

 

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

Erroroccured while trying to connect to the database

 

Exceptionwhile loading class

org.gjt.mm.mysql.Driver

 

 

         atorg.pentaho.di.core.database.Database.normalConnect(Database.java:368)

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

         atorg.pentaho.di.core.database.Database.connect(Database.java:279)

         atorg.pentaho.di.core.database.Database.connect(Database.java:269)

         atorg.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:86)

         atorg.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2464)

         atorg.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:533)

         atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

         atsun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

         atsun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

         atjava.lang.reflect.Method.invoke(Unknown Source)

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

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

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

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

         atorg.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:119)

         atorg.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)

         atorg.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)

         atorg.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)

         atorg.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)

         atorg.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)

         atorg.eclipse.jface.window.Window.runEventLoop(Window.java:820)

         atorg.eclipse.jface.window.Window.open(Window.java:796)

         atorg.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:378)

         atorg.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:304)

         atorg.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:115)

         atorg.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:62)

         atorg.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.editConnection(SpoonDBDelegate.java:88)

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

         atorg.pentaho.di.ui.spoon.Spoon.access$1900(Spoon.java:310)

         atorg.pentaho.di.ui.spoon.Spoon$24.widgetDefaultSelected(Spoon.java:5275)

         atorg.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)

         at org.eclipse.swt.widgets.EventTable.sendEvent(UnknownSource)

         atorg.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)

         atorg.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)

         atorg.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)

         at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1183)

         atorg.pentaho.di.ui.spoon.Spoon.start(Spoon.java:6968)

         atorg.pentaho.di.ui.spoon.Spoon.main(Spoon.java:567)

         atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

         at sun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)

         atsun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

         atjava.lang.reflect.Method.invoke(Unknown Source)

         atorg.pentaho.commons.launcher.Launcher.main(Launcher.java:134)

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

Exceptionwhile loading class

org.gjt.mm.mysql.Driver

 

         atorg.pentaho.di.core.database.Database.connectUsingClass(Database.java:423)

         atorg.pentaho.di.core.database.Database.normalConnect(Database.java:352)

         ... 43 more

Causedby: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

         atjava.net.URLClassLoader$1.run(Unknown Source)

         atjava.net.URLClassLoader$1.run(Unknown Source)

         atjava.security.AccessController.doPrivileged(Native Method)

         at java.net.URLClassLoader.findClass(UnknownSource)

         atjava.lang.ClassLoader.loadClass(Unknown Source)

         atjava.lang.ClassLoader.loadClass(Unknown Source)

         at java.lang.Class.forName0(NativeMethod)

         at java.lang.Class.forName(UnknownSource)

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

         ... 44 more

 

主機名稱       : 192.168.2.1

連接埠           : 3306

資料庫名:test

 

 

內事不決問百度,外事不決問Google。那就問問吧。

 

將對應的mysql驅動包(mysql-connector-java-5.1.15-bin.jar)放到下kettle的目錄:data-integration\libext\JDBC下。

 

再次進行串連測試通過。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.