Getting java.lang.Exception.InInitializerError at org.sikuli.script.Pattern Exception

Asked by Emmanuel Mbambo

Hi,

I've been using sikuli version 4.1.0 with java 8 on eclipse on windows 10 for the past 2 months.

Yesterday when I ran the code a couple of times, it worked, then I got the following Exception:

Exception in thread "main" java.lang.Exception.InInitializerError
at org.sikuli.script.Pattern<init>(Pattern.java:128)
at sikuliTess4j.SikuTess4j.main(SikuTess4j.java:130)
Caused by: org.sikuli.script.SikuliXception: loadlib: opencv_java430.dll not in any libs folder
at org.sikuli.script.support.Runtime.libsLoad(Runtime.java:1251)
org.sikuli.script.support.Runtime.loadLibrary(Runtime.java:1434)
org.sikuli.script.Finder$Finder2.<clinit>(Finder.java:538)

I added this (api-ms-win-downlevel-shlwapi-l1-1-0.dll) missing file on my windows System32 path but I'm still receiving the same Exception when trying to find a pattern.

The code will actually work when I click or type using a region but when I try finding a pattern I get the above Exception.

Please assist.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Emmanuel Mbambo
Solved:
Last query:
Last reply:
Revision history for this message
Emmanuel Mbambo (emmasibu) said :
#1

Sorry the sikuli version I'm using is 4.5.4

Revision history for this message
RaiMan (raimund-hocke) said :
#2

4.5.4 is not a valid SikuliX version.

Actually supported versions are 2.0.x (most recent 2.0.5).

Revision history for this message
RaiMan (raimund-hocke) said :
#4

do the following:
- in <APPDATA> folder delete folder SikuliX
- run the SikuliX IDE
- capture an image and open Preview -> Matching Preview

If everything works, run your Eclipse stuff.

This should have restored the needed files in <APPDATA>/Sikulix