I will get such error when using Pix the first time java.lang.UnsatisfiedLinkError: Error looking up function 'pixaConvertTo8Color': /usr/local/lib/liblept.so.5: undefined symbol: pixaConvertTo8Color com.sun.jna.Function.<init>(Function.java:208) com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:536) com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:513) com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:499) com.sun.jna.Native.register(Native.java:1509) com.sun.jna.Native.register(Native.java:1396)...
Lept4j is 1.6.0 and Leptonical is 1.74.4. Tesseract can work well only meeth this error when using Pix with leptonical.
I am using tess4j in Linux to use OCR in java and involved lept4j. When using code as below Pix pix = Leptonica1.pixRead(image.getPath()); will get the error as java.lang.UnsatisfiedLinkError: Error looking up function 'pixaConvertTo8Color': /usr/local/lib/liblept.so.5: undefined symbol: pixaConvertTo8Color com.sun.jna.Function.<init>(Function.java:208) com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:536) com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:513) com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:499)...
Got resolved by specifying LD_LIBRARY_PATH. Thanks.
BTW tesseract can work well in command line.
I am using tess4j 4.0.0 with tesseract 4. Got the error as java.lang.NoClassDefFoundError: Could not initialize class net.sourceforge.tess4j.TessAPI1 for the code this.tessBaseAPI = TessAPI1.TessBaseAPICreate(); Tesseract is installed well. Anything special i have to check for this? Thanks.
Included all the dependencies but still got the same error. It only happend in AWS AMI and not happend in MAC and Ubuntu
This is the POM.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 <a href=" http:="" maven.apache.org="" maven-v4_0_0.xsd"="">http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.teaminternational.intern</groupId> <artifactId>WebMail</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>WebMail</name> <properties> <spring.version>3.2.0.RELEASE</spring.version>...