Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder --- use build > #152 or SNAPSHOT > -66

Asked by gravizip555 on 2018-12-19

Hi guys, I gave up, and decided to ask the community..

Today morning my Sikuli program worked fine, but now it doesn't. I got error in Pattern class. It can't find opencv_java342.dll

My environment:
IntelliJ IDEA, gradle, sikulixapi 1.1.4, java jdk1.8.0
Full project can be downloaded from here: https://yadi.sk/d/toJFUNk5V-bmYw

I've simplified the code, so now I have only one class and one png image as resource:
https://imgur.com/VeECc3B
Execution fails in runtime (see picture above):
loadlib: opencv_java342.dll not in any libs folder
Exception in thread "main" java.lang.ExceptionInInitializerError
 at org.sikuli.script.Pattern.<init>(Pattern.java:125)
 at Launcher.main(Launcher.java:6)
Caused by: java.lang.RuntimeException: Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder
 at org.sikuli.script.Sikulix.terminate(Sikulix.java:58)
 at org.sikuli.script.RunTime.terminate(RunTime.java:60)
 at org.sikuli.script.RunTime.libsLoad(RunTime.java:915)
 at org.sikuli.script.RunTime.loadLibrary(RunTime.java:1105)
 at org.sikuli.script.Finder2.<clinit>(Finder2.java:33)
 ... 2 more

Gradle build file content:
https://imgur.com/QhuUT30

I even tried to download opencv_java342.dll and load it in runtime in my code, it didn't help..also tried to reimport sikulixapi in gradle by deleting gradle's cache- it also didn't help. And the program worked in the morning smoothly, and now(when I came back from work) it doesn't..so strange..
Any suggestions? Thanks in advance for any help!

Update: Just copied the project to different Windows machine - same result, throws error..

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
gravizip555
Solved:
2018-12-20
Last query:
2018-12-20
Last reply:
2018-12-20
RaiMan (raimund-hocke) said : #1

Sorry for the inconvenience.

Yesterday there was a snapshot with this problem on Windows for some hours.

The latest snapshot should work again (https://github.com/RaiMan/SikuliX1/commit/5b0eeb8750795ffdefc204d62744646f168ab304)

Since I am developing on Mac, there was a delay ;-) before testing the fix on Windows.

gravizip555 (gravizip555) said : #2

RaiMan, thank you for the reply!

I've tried to re-import sikulixapi, and still I see same issue. Could you please confirm that I am using latest snapshot (see image below)?
https://i.imgur.com/IAEte3G.png

gravizip555 (gravizip555) said : #3

And yes, as you've noticed I am on Windows (x64) :)

RaiMan (raimund-hocke) said : #4

Ok, there was a problem left, when using the snapshot-jar.

It is fixed now.

reload and get snapshot ....-65

gravizip555 (gravizip555) said : #5

As I see new versions ..-65 and ..-66 are available, but my gradle hardly continues to download ..-64th version:
https://i.imgur.com/jn8amBw.png

I know that this is like an offtopic question but maybe you know how to force gradle to download latest snapshot (by timestamp)? As far as I know it must download latest version by default. Last two days definitely not the luckiest for me :)

gravizip555 (gravizip555) said : #6

Ok, I've removed everything from c:\Users\<username>\.gradle\caches\ and gradle downloaded ..-66th snapshot (sikulixapi-1.1.4-20181220.120539-66.jar), which is latest. See screenshot: https://i.imgur.com/b0SHlZL.png

Same issue..could you please check this snapshot, maybe you missed something during applying fix?

gravizip555 (gravizip555) said : #7

This is a regression since 1.1.4-20181214.081346-62. Just downgraded to this version using gradle and everything works fine now.

p.s: Additionally I would like to say huge thank you to RaiMan for supporting this wonderful project, documentation is very easy to read and understand, it just rocks! Thank you guys for this product.

p.s.s: I am closing the issue as 'solved'.

RaiMan (raimund-hocke) said : #8

Sorry for the inconvenience.

fixed build #153 / snapshot 20181220.142335-67

I have to revise my test strategy, to also do some tests also with the jar from OSSRH.

Evgeniy (evgeniysm) said : #9

Hi!
I have the same error:
Sikulix fatal error: loadlib: opencv_java342.dll not in any libs folder

env: Eclipse, Win 7 x64.

Try to download the ready to use sikulixapi.jar and use snapshot in Gradle project (com.sikulix::sikulixapi::1.1.4-SNAPSHOT).
I'm new in Java/Gradle. Help me downgrade to 1.1.4-20181214.081346-62 please.

now I write
   compile 'com.sikulix:sikulixapi:1.1.4-SNAPSHOT'
in dependencies section of build.gradle.

RaiMan (raimund-hocke) said : #10

@Eugen ;-)
latest snapshot from today should work.

when on Linux:
see:
https://sikulix-2014.readthedocs.io/en/latest/news.html

Evgeniy (evgeniysm) said : #11

@RaiMan

Thank you! I download latest the ready to use sikulixapi.jar. And it's work!