[1.1.2] Java 9: Linux: problem running normal setup

Bug #1751840 reported by Mike Bedwell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Won't Fix
Undecided
RaiMan

Bug Description

Using Java 9, and the latest 1.1.2 nightly build

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/exec/ExecuteStreamHandler
 at java.base/java.lang.Class.forName0(Native Method)
 at java.base/java.lang.Class.forName(Class.java:292)
 at org.sikuli.natives.SysUtil.getOSUtil(SysUtil.java:36)
 at org.sikuli.script.App.<clinit>(App.java:40)
 at flax.Flax.main(Flax.java:81)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.exec.ExecuteStreamHandler
 at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
 at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
 at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
 ... 5 more

Line of code causing the error is
atitd = new App("A Tale in the Desert");

(atitd was declared elsewhere, this is just the assignment)

Code executes successfully on Mac OS X, error is only thrown in Linux.

description: updated
Revision history for this message
Mike Bedwell (bedwell2012) wrote :

error message was due to using a failed linux setup. After installing the necessary dependancies in linux and modifying the setup jar a bit (it couldn't find some libraries on the class path), I have a working api jar to build against.

Changed in sikuli:
status: New → Invalid
Revision history for this message
RaiMan (raimund-hocke) wrote :

Thanks for evaluation.

--- After installing the necessary dependancies in linux and modifying the setup jar a bit
... possible to share more specific information?

Revision history for this message
Mike Bedwell (bedwell2012) wrote :

Of course.

I'm fairly confident I over-complicated the solution, thus the lack of real detail. I installed opencv 2.4 and tesseract 3.05 on the system, as the installers check for the usability of libVisionProxy was failing due to those libraries missing. I wasn't sure if there were somehow included with the linux install routines, and the 'easy' solution for me was just to install them system wide.

I also unzipped the installer jar, and the sikulixliblux jar. I copied the class files from sikulixliblux to the installer classpath folders. Then I ran the installer class directly without rebuilding the jar. Without doing so, the installer kept crashing.

With these things done, I was able to successfully complete an install on a linux machine using the 1.1.2-20180222 nightly on linux. On my Mac, I didn't have to do any of these things, it worked flawlessly out of the box.

Revision history for this message
Mike Bedwell (bedwell2012) wrote :

It's worth noting, part of the failure was mine for not remembering the dependency issues (needing to install an older opencv (version 2) and tesseract. The only real 'issue' was that without combining the two jar files' class files, I was unable to successfully run the installer.

[debug (3/1/18, 11:49:03 AM)] RunSetup:
popAsk: --------------------
You have for Linux native libs
/home/mike/.Sikulix/SikulixDownloads/sikulixlibslux-1.1.1.jar
Click YES, if you want to use this for setup processing
... or click NO, to ignore it and download a fresh copy
--------------------
[debug (3/1/18, 11:49:05 AM)] RunSetup: Copied from Downloads: sikulixlibslux
[debug (3/1/18, 11:49:05 AM)] RunSetup: checking usability of bundled, provided or built libs

the tail of the log, after pressing YES, it crashes. Press NO and it will download the file, then crash.

RaiMan (raimund-hocke)
summary: - Error creating App object on linux using Java
+ [1.1.2] Java 9: Linux: problem running normal setup
Changed in sikuli:
status: Invalid → In Progress
importance: Undecided → High
status: In Progress → Fix Committed
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.2
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Won't Fix
importance: High → Undecided
milestone: 1.1.2 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.