AnsweredAssumed Answered

oozie ClassNotFoundException

Question asked by makuk66 on Jul 16, 2013
Latest reply on Jul 16, 2013 by nabeel
kiran and I ran into an oozie installation issue. The oozie server log showed "java.lang.ClassNotFoundException: com.mapr.fs.jni.MapRConstants". We tracked this down to the wrong jar file being picked up:

    [MapRvm] out: Setting up mapr-oozie-internal ( ...
    [MapRvm] out: Post Configuration
    [MapRvm] out: Rebuilding oozie war with hadoop jars: /opt/mapr/oozie/oozie-3.3.0/bin/ -jars /opt/mapr/hadoop/hadoop-0.20.2/lib/zookeeper-3.3.6.jar -hadoop 0.20.2 /opt/mapr/hadoop/hadoop-0.20.2
    [MapRvm] out:   setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
    [MapRvm] out:
    [MapRvm] out: INFO: Oozie webconsole disabled, ExtJS library not specified
    [MapRvm] out: Injecting following Hadoop JARs
    [MapRvm] out:
    [MapRvm] out: /opt/mapr/hadoop/hadoop-0.20.2/lib/maprfs-jni-0.20.2-2.1.3-tests.jar
    [MapRvm] out: /opt/mapr/hadoop/hadoop-0.20.2/lib/maprfs-0.20.2-2.1.3.jar

Note the "maprfs-jni-0.20.2-2.1.3-tests.jar" there; that should be "maprfs-jni-0.20.2-2.1.3.jar".

The problem is in this section of the `` script:

      if [[ -n $(find ${hadoopHome} -type f -name "maprfs-jni*.jar" -print) ]]; then

That glob matches both files, and you cannot guarantee that the right one ends up being used.
Once one of our test vm that worked fine, on another pretty-much-identical one it failed.
You could use the pattern from the last line to fix that:

      if [[ -n $(find ${hadoopHome} -type f -name "maprfs-jni*.jar" -print) ]]; then

I've not tested that, because I don't really want to be patching the .deb.
We're working around this by temporarily renaming the test jar before installing oozie.