Hadoop Jersey conflicts with Wildfly resteasy Hadoop Jersey conflicts with Wildfly resteasy hadoop hadoop

Hadoop Jersey conflicts with Wildfly resteasy


OK, I got the basic Hadoop HDFS stuff in version 2.7.1 working within WildFly 9.0.1. Details can be found in my Blog: http://rick-rainer-ludwig.com/2015/09/01/hadoop-client-in-wildfly-a-difficult-marriage

The basic steps are:

  • Switch off implicit bean archive support and force all JAR files to contain a META-INF/beans.xml if CDI beans are included. Some Hadoop client dependencies contain @Inject, which make WildFly fail during deployment
  • Add additional dependencies for jersey-server and jersey-json to bring the project into a state where it can compile. The Hadoop client dependency is not self contained. So, the additional dependencies are needed to add some missing classes.
  • Exclude hadoop-mapreduce-client-app and hadoop-mapreduce-client-jobclient, because they try to provide a service which cannot start due to missing dependencies in WildFly. Not idea, what they are for and why they are packaged there.
  • If you rely on Jackson 2, you need to package the whole Hadoop client into an own EAR, because Hadoop client enforces Jackson 1 via an packaged Provider. The EAR needs to provide a proxy with a well defined interface like a REST service or an EJB with remote interface.