I am using Apache Tika( tika-app 1.17) in wildfly modules. While I start extracting PDF it always throws the error:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.pdfbox.pdmodel.font.PDFont
For other file extensions it works fine. Things I have tried out dependencies in apache-tika module.xml to PDFbox Explicitly loaded org.apache.pdfbox from standalone.xml
I have also tried with the below structure app1.war->(WEB-INF)lib-->app.jar->lib-->tika-app-1.17.jar
I have also jboss-deployment-structure.xml where
<dependencies>
<module name="com.company.tika" />
</dependencies>
is mentioned as a module dependency. In MANIFEST.MF of the jar also, I have dependency to com.company.tika
Nothing seems to work.
Any suggestions or help would be thankful.
Thanks in Advance
Dwai
I had similar problem. Under linux i just install missing library pdfbox by:
After this modification i need to change solr start parameter in ./bin/solr from
to
because i had error
of course i restart solr server again.
I hope, it help you reolve this problem.
I could resolve the issue. The problem was the minor version of pdfbox, fontbox and jempbox were not the same. Hence the PDFFont was not initialized, because internally it needs to load the classes of fontbox also and probably there was a mismatch in the version id of the classes