i have to search in document stored in databases,among these documents is images,so i used tess4j to read this images. in windows with eclipse the project works fine with tess4j ,also if i deploy application in tomcat 6.35 in windows7 the projects works fine and i can search correctly with tess4j. sous windows 1) i add the jar files in tomcat lib/shared 2) the tessdata and dll file are in repository and i call them in the project.
in linux environment i do the same things and the first error that i get is
- Native library (linux-x86/libtesseract.so) not found in resource lib/shared/*
i add the libtesseract.so and the tessdata to this path and now i get an other error:
java.lang.UnsatisfiedLinkError: Error looking up function 'TessBaseAPICreate': /usr/lib/libtesseract.so.3.0.2: undefined symbol: TessBaseAPICreate at com.sun.jna.Function.(Function.java:208) at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:536) at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:513) at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:499) at com.sun.jna.Library$Handler.invoke(Library.java:199) at com.sun.proxy.$Proxy5.TessBaseAPICreate(Unknown Source) at net.sourceforge.tess4j.Tesseract.init(Unknown Source) at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source) at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source) at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source) at org.coin.bean.ged.Tess4j.extractTextFromImage(Tess4j.java:55) at org.coin.bean.ged.IndexDocument.CreateIndex(IndexDocument.java:158) at org.coin.bean.ged.searchlucene.setKeyword(searchlucene.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283) at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.coin.servlet.filter.PreventInjectionFilter.doFilter(PreventInjectionFilter.java:30) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:745) - --Erroring: batchId[7] message[java.lang.UnsatisfiedLinkError: Error looking up function 'TessBaseAPICreate': /usr/lib/libtesseract.so.3.0.2: undefined symbol: TessBaseAPICreate]