Pentaho - Error working with XUL definition - java

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?

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).

Related

Issue using couchbase lite java on Windows XP

I am using couchbase lite for java (couchbase-lite-java-1.3.1) for my JavaFX application.
My code is working well on Mac OS X, Windows 7/10.
Now I am trying to make it work on Windows XP but I am getting the following error:
Executing C:\Documents and
Settings\Administrator\Desktop\Testy\Testy\dist\run618830020\Testy.jar
using platform C:\Documents and
Settings\Administrator\Desktop\NetBeans_JavaSE_7.4_Portable\App\jdk\jre/bin/java
Exception in Application constructor
java.lang.reflect.InvocationTargetException at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
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
com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at
com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
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
sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Unable to construct Application
instance: class org.company.business.testy.Main at
com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:907)
at
com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745) 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
com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:819)
at
com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at
com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method) at
com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at
com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at
com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more Caused by: java.lang.UnsatisfiedLinkError: C:\Documents and
Settings\Administrator\Local
Settings\Temp\NetBeans_JavaSE_7.4_PortableTemp\CouchbaseLiteJavaForestDB.dll:
The specified procedure could not be found at
java.lang.ClassLoader$NativeLibrary.load(Native Method) at
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at
java.lang.Runtime.load0(Runtime.java:809) at
java.lang.System.load(System.java:1086) at
com.couchbase.lite.util.NativeLibUtils.loadLibrary(NativeLibUtils.java:45)
at com.couchbase.lite.store.ForestDBStore.(ForestDBStore.java:75) at
java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:264) at
com.couchbase.lite.Database.createStoreInstance(Database.java:1156) at
com.couchbase.lite.Database.open(Database.java:1221) at
com.couchbase.lite.Manager.openDatabase(Manager.java:335) at
com.couchbase.lite.Manager.getDatabase(Manager.java:299) at
org.company.business.testy.dbms.DBMS.initDatabase(DBMS.java:38) at
org.company.business.testy.dbms.DBMS.(DBMS.java:23) at
org.company.business.testy.dbms.DAO.(DAO.java:28) at
org.company.business.testy.Main.(Main.java:91) ... 13 more Exception
running application org.company.business.testy.Main
I use the same Netbeans project for Mac OS X, Windows 7 and for Windows XP.
Do you have some info about this problem? It is trying to use a procedure in CouchbaseLiteJavaForestDB.dll...
Thank you.
I reached out Couchbase Lite dev team and they advised me to remove ForestDB jar lib and to use SQLite as storage engine. Now it's working well on Windows XP.
https://forums.couchbase.com/t/issue-using-couchbase-lite-java-on-windows-xp/11405/17

Can't seem to run JavaFX project in Eclipse

I'm on Ubuntu 14.04 64-bit. I installed Oracle-8 for Java and downloaded the e(fx)clipse bundle from http://efxclipse.bestsolution.at/.
However, now I'm running into this error message:
Exception in Application constructor
java.lang.reflect.InvocationTargetException
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:497)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
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:497)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Unable to construct Application instance: class ui.project.Main
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:907)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$156(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
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:422)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:819)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$176(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$50(GtkApplication.java:139)
... 1 more
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/Utils
at org.controlsfx.tools.Platform.getCurrentPlatform(Platform.java:65)
at org.controlsfx.tools.Platform.<clinit>(Platform.java:41)
at org.controlsfx.dialog.HeavyweightDialog.<clinit>(HeavyweightDialog.java:72)
at org.controlsfx.dialog.DialogFactory.createDialog(DialogFactory.java:58)
at org.controlsfx.dialog.Dialog.<init>(Dialog.java:295)
at org.controlsfx.dialog.Dialogs.buildDialog(Dialogs.java:1086)
at org.controlsfx.dialog.Dialogs.showCommandLinks(Dialogs.java:692)
at ui.project.Main.welcomeWindow(Main.java:175)
at ui.project.Main.<init>(Main.java:64)
... 13 more
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.Utils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 22 more
Exception running application ui.project.Main
Main 64 calls method welcomeWindow in line 175 which includes this line:
Action response = Dialogs.create()
.title("Welcome to the Dolphin UI")
.masthead(null)
.message("Please select an option to proceed.")
.showCommandLinks(links.get(3), links);
The problem is that the class com.sun.javafx.Utils was moved to com.sun.javafx.util.Utils package in update 60 of Java 8.
I see that you use ControlsFX in your code. Then, take a new version of ControlsFX solve this problem.
More info:
https://bitbucket.org/controlsfx/controlsfx/issues/526/comsunjavafxutils-changes-to
After spending roughly 8 hours on this, using three different operating systems (Ubuntu 32, 64 and Windows 8.1), the issue was with Java. Apparently, any version after 8u40 will not work with this.

Run Gate pipeline in eclipse I get this error Java.lang.ClassNotFoundException: gate.resource

I want to create Web service in eclipse + Tomcate v7 and use pipeline I created in Gate in Ubuntu 12.04 32 bit
but I get this error:
can you help me for solving this error??
INFO: Exception:
java.lang.NoClassDefFoundError: gate/Resource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:142)
at org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85)
at org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:428)
at org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461)
at org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:286)
at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:500)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:427)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
Caused by: java.lang.ClassNotFoundException: gate.Resource
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 53 more
Add all jar files in following folders in your build path:
.../GATE_Developer_7.1/bin/
.../GATE_Developer_7.1/lib/
Maybe my answer is a bit late, but I had the same error and found that it's due to the use of '~' for $HOME.
Changing ~/Gate/bin/gate.jar with /home/user/Gate/bin/gate.jar solved the problem for me.

Jenkins Build Failure. ERROR: Failed to parse POMs

Hi I'm having this problem with Jenkins when trying to use it with a maven build project.
This is the error log.
Any help would be much appreciated.
I looked through older questions and none of them seem to answer my problem. I'm not using a repo, just local.
Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/jobs/Test3/workspace
Parsing POMs
Modules changed, recalculating dependency graph
[SmartAssetScreenShotTool copy] $ /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -cp /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/Users/Shared/Jenkins/Home/apache-maven-3.2.2/boot/plexus-classworlds-2.5.1.jar:/Users/Shared/Jenkins/Home/apache-maven-3.2.2/conf/logging jenkins.maven3.agent.Maven31Main /Users/Shared/Jenkins/Home/apache-maven-3.2.2 /Users/Shared/Jenkins/Home/war/WEB-INF/lib/remoting-2.43.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 64622
<===[JENKINS REMOTING CAPACITY]===>channel started
channel stopped
ERROR: Failed to parse POMs
java.io.IOException: Remote call on Channel to Maven [/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java, -cp, /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/Users/Shared/Jenkins/Home/apache-maven-3.2.2/boot/plexus-classworlds-2.5.1.jar:/Users/Shared/Jenkins/Home/apache-maven-3.2.2/conf/logging, jenkins.maven3.agent.Maven31Main, /Users/Shared/Jenkins/Home/apache-maven-3.2.2, /Users/Shared/Jenkins/Home/war/WEB-INF/lib/remoting-2.43.jar, /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar, /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar, 64622] failed
at hudson.remoting.Channel.call(Channel.java:748)
at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:160)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:843)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535)
at hudson.model.Run.execute(Run.java:1732)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
Caused by: java.lang.InternalError: Can't connect to window server - not enough permissions.
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1833)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1730)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1044)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1605)
at java.awt.Toolkit.<clinit>(Toolkit.java:1627)
at java.awt.Color.<clinit>(Color.java:263)
at hudson.util.ColorPalette.<clinit>(ColorPalette.java:39)
at hudson.model.BallColor.<clinit>(BallColor.java:56)
at hudson.model.Result.<clinit>(Result.java:52)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at com.sun.proxy.$Proxy7.<clinit>(Unknown Source)
at sun.reflect.GeneratedSerializationConstructorAccessor44.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:929)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1761)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1970)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1895)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1777)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at java.util.HashMap.readObject(HashMap.java:1030)
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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:979)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1873)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1777)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1970)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1895)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1777)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
at hudson.remoting.UserRequest.perform(UserRequest.java:98)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
Finished: FAILURE
Found the answer a while back. Please refer to this for those who may need the solution in the future Jenkins can't connect to window server - not enough permissions

im4j on Mac OSX not able to run commands

We have photo client program written using im4j wrapper to invoke ImageMajick to process the photo.
The setup runs well on Windows OS , however when we run it on Mac OSX, we keep getting the following exception
org.im4java.core.InfoException: org.im4java.core.CommandException: java.io.IOException: Cannot run program "identify": error=2, No such file or directory
at org.im4java.core.Info.getBaseInfo(Info.java:201)
at org.im4java.core.Info.<init>(Info.java:96)
at tenw.photos.ImageTransformer.getImageInfo(ImageTransformer.java:474)
at tenw.photos.ImageTransformer.getCenterCoordinates(ImageTransformer.java:517)
at tenw.photos.ImageTransformer.cropCenter(ImageTransformer.java:157)
at tenw.photos.ImageTransformerTest.testCropCenter(ImageTransformerTest.java:32)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
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.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:96)
at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:117)
at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:94)
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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: org.im4java.core.CommandException: java.io.IOException: Cannot run program "identify": error=2, No such file or directory
at org.im4java.core.ImageCommand.run(ImageCommand.java:215)
at org.im4java.core.Info.getBaseInfo(Info.java:189)
... 33 more
Caused by: java.io.IOException: Cannot run program "identify": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at org.im4java.process.ProcessStarter.startProcess(ProcessStarter.java:407)
at org.im4java.process.ProcessStarter.run(ProcessStarter.java:312)
at org.im4java.core.ImageCommand.run(ImageCommand.java:211)
... 34 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
The command identify is found in the PATH variable.
When the same command is executed on shell, it works fine. Any help much appreciated.
Got this working my setting path variable in eclipse's environment variable settings. Some one could enhance the answer as to why the JVM could not pick up the path variable before executing the command

Categories

Resources