Wildfly 10 and apache tika parser deployment problem
kujalar Sep 20, 2016 9:31 AMWe have an enterprise application, which runs currently with wildfly 8.2.0.Final.
I have upgraded my maven build and it builds the ear application, but when I try to deploy the ear to the wildfly I get class not found error from an apache tika parser.
Error is like this - from a server.log
"{
\"WFLYCTL0080: Failed services\" => {\"jboss.persistenceunit.\\\"veikko-ear.ear/veikko-ejb.jar#primary\\\"\" => \"org.jboss.msc.service.StartException in service jboss.persistenceunit.\\\"veikko-ear.ear/veikko-ejb.jar#primary\\\": java.lang.NoClassDefFoundError: org/apache/tika/parser/Parser
Caused by: java.lang.NoClassDefFoundError: org/apache/tika/parser/Parser
Caused by: java.lang.ClassNotFoundException: org.apache.tika.parser.Parser from [Module \\\"org.hibernate.search.engine:main\\\" from local module loader @63e31ee (finder: local module finder @68fb2c38 (roots: C:\\\\Users\\\\kujalar\\\\opt\\\\jboss\\\\wildfly-10.1.0.Final_vaadin\\\\modules,C:\\\\Users\\\\kujalar\\\\opt\\\\jboss\\\\wildfly-10.1.0.Final_vaadin\\\\modules\\\\system\\\\layers\\\\base))]\"},
\"WFLYCTL0412: Required services that are not installed:\" => [\"jboss.persistenceunit.\\\"veikko-ear.ear/veikko-ejb.jar#primary\\\"\"],
\"WFLYCTL0180: Services with missing/unavailable dependencies\" => undefined
}"
The project is organised like this
veikko->ear (depoloyed as ear, containing ejb and war packet)
->ejb
->war
so it looks like wildfly cannot load the tika parser module.
Hibernate search and Tika parser are declared in a ejb packets pom.xml like this
<!-- Search -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<scope>compile</scope><!-- i have tried provided scope also -->
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.6</version>
<exclusions>
<exclusion>
<artifactId>xercesImpl</artifactId>
<groupId>xerces</groupId>
</exclusion>
</exclusions>
</dependency>
If I check from the apache tika project page, it says I should only add org.apache.tike dependency,
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.13</version>
</dependency>
but this does not seem to be enough.
Is there a help with this problem?
Yours Ari Kujala