Load error with Tesseract OCR Application

Hi,

after installing the Tesseract OCR Application, loading some training data files, I get the java load error

 no lept in java.library.path
class java.lang.UnsatisfiedLinkError: no jnilept in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
    at java.lang.Runtime.loadLibrary0(Runtime.java:871)
    at java.lang.System.loadLibrary(System.java:1124)
    at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:804)
    at org.bytedeco.javacpp.Loader.load(Loader.java:613)
    at org.bytedeco.javacpp.Loader.load(Loader.java:530)
    at org.bytedeco.javacpp.lept.<clinit>(lept.java:10)
    at java.lang.Class.forName0(Native Method)

when trying to do an import by the standard OCR import job by OCR.Tesseract
which selects one of the training languages, a file to be uploaded and a destination to store the result.

(XWiki version: 13.10.4)

All help is welcome

Norbert

Hello @NorSch,

Trying to look for your error on the web, I found the following thread that seems to refer to the same issue that you are running into : Getting UnsatisfiedLinkError: no jnilept in java.library.path when I create TessBaseAPI. Which talks about two issues running Tesseract : one about missing libraries (the one that you seem to be facing), and one about a wrong locale being set.

The dependency org.bytedeco.javacpp-presets:leptonica-platform is currently not declared in the POM of the Tesseract OCR API, which could be your issue. Can you try to install this dependency in the same wiki, restart XWiki and then see if it helps for the import ?

Thanks,
Clément

Hello @caubin,

the dependency org.bytedeco.javacpp-presets:leptonica-platform has already been installed as a dependent extension during the Tesseract installation:

JavaCPP Presets Platform for Leptonica

with id: org.bytedeco.javacpp-presets:leptonica-platform, version: 1.73.1.3

I have tried an upgrade to 1.77.0-1.4.4: It installed without any problems.

But the load problem still exists (after XWiki restart too)

The “Web talks” in this context about changing the java.library.path and a bit strange hint about a 32/64 bit mismatch (in thread "main" java.lang.UnsatisfiedLinkError: no jnilept in java.library.path - Stack Overflow)

Before i change the library path (tomcat9, java, xwiki… where ?), i will do some deeper research.

Thanks
Norbert