Details
Description
I am using tikka 1.18 version to parse the docuemtn content. It is working independently when deployed on linux but it is not working. If tessract is used before it. It is giving below error while parseTostring
code :
Tika tika = new Tika();Tika tika = new Tika();
try(InputStream stream = new FileInputStream(Paths.get(documentPath.concat(documentName)).toAbsolutePath().toString()))
{ String documentExt = tika.detect(Paths.get(documentPath.concat(documentName)).toAbsolutePath().toString()); String outputStr = tika.parseToString(stream); String tempStr = outputStr.replace("\n", ""); _Logger.info("tempStr: " +tempStr); }catch (TikaException e) {
// TODO Auto-generated catch block _Logger.error("Error :",e); }
Error as :
java.lang.StackOverflowError
at org.slf4j.impl.JDK14LoggerAdapter.fillCallerData(JDK14LoggerAdapter.java:602)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:587)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:660)
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:221)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:303)
at java.util.logging.Logger.log(Logger.java:738)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:588)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:660)
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:221)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:303)
at java.util.logging.Logger.log(Logger.java:738)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:588)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:660)
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:221)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:303)
at java.util.logging.Logger.log(Logger.java:738)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:588)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:660)
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:221)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:303)
at java.util.logging.Logger.log(Logger.java:738)
...
>
kindly let us know the solution