Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NoClassDefFoundError when running Atlas integration from Docker container

NoClassDefFoundError when running Atlas integration from Docker container

New Contributor

Running the Atlas integration in a Nifi Docker container throws this exception after configuring the ReportLineageToAtlas Reporting Task and staring it:


2019-07-23 13:00:05,753 ERROR [Timer-Driven Process Thread-3] o.a.n.a.reporting.ReportLineageToAtlas ReportLineageToAtlas[id=1f01a738-016c-1000-ffff-ffffada9f376] Failed to invoke @OnScheduled method due to java.lang.NoClassDefFoundError: Could not initialize class org.apache.nifi.atlas.hook.NiFiAtlasHook: {}
java.lang.NoClassDefFoundError: Could not initialize class org.apache.nifi.atlas.hook.NiFiAtlasHook
        at org.apache.nifi.atlas.reporting.ReportLineageToAtlas.initLineageStrategy(ReportLineageToAtlas.java:453)
        at org.apache.nifi.atlas.reporting.ReportLineageToAtlas.setup(ReportLineageToAtlas.java:448)
        at sun.reflect.GeneratedMethodAccessor366.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:142)
        at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:130)
        at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:75)
        at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:52)
        at org.apache.nifi.controller.scheduling.StandardProcessScheduler$2.run(StandardProcessScheduler.java:214)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

I've tried running this Atlas jar from a standalone local node, the Docker container at https://hub.docker.com/r/apache/nifi/ and I've tried it on my own container. I only ever seem to have this issue in my own container, but I've tried using all of the same jars and nars for both with no success. Any ideas where I should be looking to fix this? Seems like a classpath issue, but I can't reproduce it.