yonbinblue
2021-04-26 16:11
采纳率: 100%
浏览 79

kettle连接数据库报错InvocationTargetException

系统:macbook pro|mac OS Big Sur 11.2.3

kettle版本:7.1和9.1都尝试过,出现的问题都一样;

JDK:网上多半讲的这个问题是JDK版本的问题;所以我尝试了好几个JDK版本:jdk1.8.0_291.jdk、jdk1.8.0_202.jdk等(其他的删除了不记得版本号了,都是1.8.0_*);

java -version输出:

java version "1.8.0_202"

Java(TM) SE Runtime Environment (build 1.8.0_202-b08)

Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

 

swt.jar也下载替换过(否则会出现闪退问题);

lib的jar包是(也换版本尝试过):mysql-connector-java-5.1.48-bin.jar、mysql-connector-java-5.1.48.jar

 

spoon.sh文件中把:x86_64改成了arm64;

 

 

报错详情:

org.pentaho.ui.xul.XulException: org.pentaho.ui.xul.XulException: java.lang.reflect.InvocationTargetException
    at org.pentaho.ui.xul.impl.AbstractXulLoader.loadXul(AbstractXulLoader.java:135)
    at org.pentaho.ui.xul.swt.SwtXulLoader.loadXul(SwtXulLoader.java:128)
    at org.pentaho.ui.xul.swt.SwtXulLoader.loadXul(SwtXulLoader.java:122)
    at org.pentaho.ui.xul.impl.AbstractXulLoader.loadXul(AbstractXulLoader.java:243)
    at org.pentaho.ui.database.DatabaseConnectionDialog.getSwtInstance(DatabaseConnectionDialog.java:60)
    at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.createDialog(XulDatabaseDialog.java:163)
    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:818)
    at org.pentaho.di.ui.trans.step.BaseStepDialog$AddConnectionListener.widgetSelected(BaseStepDialog.java:1497)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4443)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4229)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3839)
    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:8854)
    at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3287)
    at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:785)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:200)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4443)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4229)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3839)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1405)
    at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7989)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9371)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:711)
    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.commons.launcher.Launcher.main(Launcher.java:92)
Caused by: org.pentaho.ui.xul.XulException: java.lang.reflect.InvocationTargetException
    at org.pentaho.ui.xul.impl.XulParser.getElement(XulParser.java:239)
    at org.pentaho.ui.xul.impl.XulParser.parse(XulParser.java:164)
    at org.pentaho.ui.xul.impl.XulParser.parse(XulParser.java:171)
    at org.pentaho.ui.xul.impl.XulParser.parse(XulParser.java:171)
    at org.pentaho.ui.xul.impl.XulParser.parse(XulParser.java:171)
    at org.pentaho.ui.xul.impl.XulParser.parseDocument(XulParser.java:85)
    at org.pentaho.ui.xul.impl.AbstractXulLoader.loadXul(AbstractXulLoader.java:127)
    ... 41 more
Caused by: java.lang.reflect.InvocationTargetException
    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 org.pentaho.ui.xul.impl.XulParser.getElement(XulParser.java:227)
    ... 47 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/custom/TableTreeItem
    at org.eclipse.jface.util.OpenStrategy.initializeHandler(OpenStrategy.java:269)
    at org.eclipse.jface.util.OpenStrategy.<init>(OpenStrategy.java:107)
    at org.eclipse.jface.viewers.StructuredViewer.hookControl(StructuredViewer.java:1161)
    at org.eclipse.jface.viewers.ListViewer.<init>(ListViewer.java:79)
    at org.eclipse.jface.viewers.ListViewer.<init>(ListViewer.java:67)
    at org.pentaho.ui.xul.swt.tags.SwtListbox.<init>(SwtListbox.java:90)
    ... 52 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.custom.TableTreeItem
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 58 more
 

 

实在想不出来这问题是什么造成的,希望知道这个问题解决方案的朋友留下答案,谢谢大家!

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • yonbinblue 2021-05-08 13:38
    已采纳

    我自己回复一下这个问题吧,问题最终解决掉了,是按照这个地址的方法(注意下方我有回复:是从这个博主的提供的百度网盘地址中下载了kettle之后就一切正常了):https://blog.csdn.net/ManWZD/article/details/109953243

    打赏 评论

相关推荐 更多相似问题