sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #52127
[Bug 1835908] Re: could not initialize class org.sikuli.finder
I just made a test with the lates build of sikulixapi.jar (#321), which
did not make any problems:
package com.sikulix;
import org.sikuli.basics.Debug;
import org.sikuli.script.Finder;
import java.awt.image.BufferedImage;
public class Main {
public static void main(String[] args) {
Debug.on(3);
BufferedImage img = new BufferedImage(100,100, BufferedImage.TYPE_3BYTE_BGR);
Finder objFinder = new Finder(img);
System.exit(0);
}
}
Having the sikulixapi.jar on the classpath.
my output:
***** show environment for 1.1.4-SNAPSHOT-#321-2019-07-11_10:05 API
user.home: C:\Users\rmhde
user.dir (work dir): C:\Users\rmhde\IdeaProjects\TestAPIComplete
user.name: rmhde
java.io.tmpdir: C:\Users\rmhde\AppData\Local\Temp
running 64Bit(amd64) on w (10.0) from a jar
java 8 version 1.8 vm 25.201-b09 class 52.0 arch 64
app data folder: C:\Users\rmhde\AppData\Roaming\Sikulix
executing jar: C:\SikuliX\_Latest\API\sikulixapi.jar
*** classpath dump
0: file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/charsets.jar
...
22: file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/rt.jar
23: file:/C:/Users/rmhde/IdeaProjects/TestAPIComplete/out/production/TestAPIComplete/
24: file:/C:/SikuliX/_Latest/API/sikulixapi.jar
25: file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%20Community%20Edition%202018.3.5/lib/idea_rt.jar
*** classpath dump end
***** show environment end
[114 debug] RunTime:libsExport: folder has wrong content: C:\Users\rmhde\AppData\Roaming\Sikulix\SikulixLibs (1.1.4 - 201907111158)
[905 debug] RunTime:addToWindowsSystemPath: added to systempath:
C:\Users\rmhde\AppData\Roaming\Sikulix\SikulixLibs
[905 debug] RunTime:checkJavaUsrPath: added to ClassLoader.usrPaths
[920 debug] RunTime:libsExport: folder created: C:\Users\rmhde\AppData\Roaming\Sikulix\SikulixLibs (1.1.4 - 201907111005)
[1217 debug] RunTime:loadLib: opencv_java342.dll (success)
[1217 debug] Finder2: makeMat: 3BYTE_BGR (100x100)
Finder: org.sikuli.script.Finder@3834d63f
[1217 debug] RunTime:***** final cleanup at System.exit() *****
[1264 debug] FileManager: deleteFileOrFolder:
C:\Users\rmhde\AppData\Local\Temp\Sikulix_113292954
Process finished with exit code 0
** Changed in: sikuli
Status: New => Fix Committed
** Changed in: sikuli
Importance: Undecided => Critical
** Changed in: sikuli
Assignee: (unassigned) => RaiMan (raimund-hocke)
** Changed in: sikuli
Milestone: None => 1.1.4
** Summary changed:
- could not initialize class org.sikuli.finder
+ [1.1.4] Class com.sun.jna.Native not found --- fixed build #321
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1835908
Title:
[1.1.4] Class com.sun.jna.Native not found --- fixed build #321
Status in Sikuli:
Fix Committed
Bug description:
Exception in thread "Thread-145" Exception in thread "Thread-133" java.lang.NoClassDefFoundError: Could not initialize class org.sikuli.script.Finder$FindInput2
at org.sikuli.script.Finder.<init>(Finder.java:36)
at OlegServer.Tests.MurderInAlpsTests.lambda$existingObjects$1(MurderInAlpsTests.java:2392)
at java.base/java.lang.Thread.run(Thread.java:835)
java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
at org.sikuli.natives.SXUser32.<clinit>(SXUser32.java:9)
at org.sikuli.natives.WinUtil.<clinit>(WinUtil.java:37)
at org.sikuli.script.support.RunTime.addToWindowsSystemPath(RunTime.java:1631)
at org.sikuli.script.support.RunTime.libsExport(RunTime.java:1574)
at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1399)
at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1603)
at org.sikuli.script.Finder$Finder2.<clinit>(Finder.java:571)
at org.sikuli.script.Finder$FindInput2.<clinit>(Finder.java:1210)
at org.sikuli.script.Finder.<init>(Finder.java:36)
at OlegServer.Tests.MurderInAlpsTests.lambda$existingObjects$1(MurderInAlpsTests.java:2392)
at java.base/java.lang.Thread.run(Thread.java:835)
i am getting these exception when running:
Finder objFinder = new Finder(BufferedImage);
This code worked fine on sikuli 1.1.4 and then stopped working after updating to latest 1.1.4 build
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1835908/+subscriptions
References