Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Tess4J in war (web app) on Application server (Payara, glassfish,..) #171

Open
scrmtrey91 opened this issue Nov 25, 2019 · 0 comments

Comments

@scrmtrey91
Copy link

scrmtrey91 commented Nov 25, 2019

Hello there.

I am experimenting with tess4j for about 2 weeks in total. When i run my junit test case, everything is good. Also it gives great results.

Now i implemented it into an war application and deployed it to payara app server.

If i dont run any OCR with tess4j (not creating instance), the war can be redeployed infinity number of times. But when i do run OCR (also working great as expected from tests) then i cannot redeploy the app any more via IDE (IntelliJ).

  • it uses constantly 20% of the CPU after OCR , even in idle condition when OCR finished OK with the ocr text.

Error from redeploy:
[2019-11-25 01:22:53,352] Artifact doksis-ui:war exploded: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while loading the app : EJB Container initialization error. Please see server.log for more details.

And there is no additional errors in server.log about this issue.

Any idea ?

<dependency>
      <groupId>net.sourceforge.tess4j</groupId>
      <artifactId>tess4j</artifactId>
      <version>4.4.1</version>
</dependency>
  • jai-imageio-core (1.4.0) and pdfbox (2.0.17)

Using like this:

Tesseract1 instance = new Tesseract1();
instance.setDatapath("C:\\Users\\user1\\tessdata"); 
instance.setLanguage("slv");
String result = instance.doOCR(img2ocr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant