Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pentaho - Error working with XUL definition

Tags:

java

pentaho

I'm running into an issue with Pentaho Community Edition on mac running Catalina. When I go to either create a new database connection or edit an existing one, I get an error message saying Error working with XUL definition and org.pentaho.ui.xul.XulException: java.lang.reflect.InvocationTargetException.

Error details are as follows:

    at org.pentaho.ui.xul.impl.AbstractXulLoader.loadXul(AbstractXulLoader.java:134)
    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:242)
    at org.pentaho.ui.database.DatabaseConnectionDialog.getSwtInstance(DatabaseConnectionDialog.java:60)
    at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.createDialog(XulDatabaseDialog.java:153)
    at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:107)
    at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:60)
    at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:494)
    at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:481)
    at org.pentaho.di.ui.spoon.Spoon.newConnection(Spoon.java:8750)
    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.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.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.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
    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:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3789)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1366)
    at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7984)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9245)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:692)
    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:126)
    ... 40 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)
    ... 46 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)
    ... 51 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)
    ... 57 more

I'm running Java 8, and I've replaced the swt.jar file with the most recent version. Any idea what other steps I could take to alleviate the issue?

like image 611
clarktwain Avatar asked Oct 16 '22 01:10

clarktwain


1 Answers

I ran into this same problem and it turned out to be an issue with the latest version of Java 8 (u291). I downgraded to jdk-8u202 and used the default swt.jar file that comes with pdi-ce-9.1.0.0-324.

Uninstall current version of Java:

In the Terminal window Copy and Paste the commands below:

    sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
    sudo rm -fr ~/Library/Application\ Support/Oracle/Java

Download and install older version:

https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html

Don't forget to swap out the swt.jar file inside /Applications/data-integration/libswt/osx64

You may need to redownload the original data-integration folder to get the correct swt.jar file (that's what I did).

like image 168
simian_fiction Avatar answered Oct 21 '22 05:10

simian_fiction