JNA library doesn't load dispite being present

222 views Asked by At

I'm trying to use Tesseract.

java.lang.NoClassDefFoundError: Could not initialize class net.sourceforge.tess4j.TessAPI

I've checked if this library is found via jna debug.

Found library resource at jar:file:/C:/Users/pjfg787/.m2/repository/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar!/com/sun/jna/win32-x86-64/jnidispatch.dll

Looking for library 'libtesseract304'

Adding paths from jna.library.path: C:\Users\pjfg787\AppData\Local\Temp\tess4j\win32-x86-64;C:\Users\pjfg787\AppData\Local\Temp\tess4j\win32-x86-64

Trying C:\Users\pjfg787\AppData\Local\Temp\tess4j\win32-x86-64\libtesseract304.dll

Adding system paths: []

Trying C:\Users\pjfg787\AppData\Local\Temp\tess4j\win32-x86-64\libtesseract304.dll Looking for lib- prefix Trying liblibtesseract304.dll Looking in classpath from sun.misc.Launcher$AppClassLoader@18b4aac2 for libtesseract304

Found library resource at jar:file:/C:/Users/pjfg787/.m2/repository/net/sourceforge/tess4j/tess4j/3.1.0/tess4j-3.1.0.jar!/win32-x86-64/libtesseract304.dll

[20/04/2023 09:45:01:273] -[none] -[Inconnu] -[none] [ERROR] read.logic.service.identity.utils.LogicIdentityOcr - java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class net.sourceforge.tess4j.TessAPI

As you can see, it's looking for the right dll, on the right path but it doesn't load at all.

(I've checked, this dll : libtesseract304.dll exists on the path)

Another information : It's working fine for others members of my team with the exact same configuration.

Any help would be appreciated as I've tried everything on my mind.

0

There are 0 answers