Karel created NIFI-6213:
---------------------------

             Summary: Custom Transformation Class not found with 
JoltTransformJSON Processor
                 Key: NIFI-6213
                 URL: https://issues.apache.org/jira/browse/NIFI-6213
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.9.1
         Environment: Ubuntu 16.04
            Reporter: Karel
         Attachments: jolt-processor-config.png

Jolt Processor fails to load the custom transform class from the "Custom Module 
Directory" when executing the flow.

I have implemented the com.bazaarvoice.jolt.Transform interface and have 
compiled all its dependencies into a single jar. I¡ve placed the jar to a 
directory "/data/bin/nifi-1.9.1/jolt_modules".

My configuration looks like this:

 

!jolt-processor-config.png!

The processor validates itself ok, but when running the flow it shows exception:
{noformat}
2019-04-01 14:30:54,196 ERROR [Timer-Driven Process Thread-4] 
o.a.n.p.standard.JoltTransformJSON 
JoltTransformJSON[id=b407714f-0169-1000-d9b2-1709069238d7] Unable to transform 
StandardFlowFileRecord[uuid=72dc471b-c587-4da9-b54c-eb46247b0cf4,claim=StandardContentClaim
 [resourceClaim=StandardResourceClaim[id=1554129053747-21203, 
container=default, section=723], offset=607170, 
length=5363],offset=0,name=72dc471b-c587-4da9-b54c-eb46247b0cf4,size=5363] due 
to java.util.concurrent.CompletionException: java.lang.ClassNotFoundException: 
org.sentilo.nifi.elasticsearch.ElasticsearchToOpenTSDB: 
java.util.concurrent.CompletionException: java.lang.ClassNotFoundException: 
org.sentilo.nifi.elasticsearch.ElasticsearchToOpenTSDB
java.util.concurrent.CompletionException: java.lang.ClassNotFoundException: 
org.sentilo.nifi.elasticsearch.ElasticsearchToOpenTSDB
        at 
com.github.benmanes.caffeine.cache.BoundedLocalCache$BoundedLocalLoadingCache.lambda$new$0(BoundedLocalCache.java:3373)
        at 
com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2039)
        at 
java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853)
        at 
com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2037)
        at 
com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2020)
        at 
com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:112)
        at 
com.github.benmanes.caffeine.cache.LocalLoadingCache.get(LocalLoadingCache.java:67)
        at 
org.apache.nifi.processors.standard.JoltTransformJSON.getTransform(JoltTransformJSON.java:316)
        at 
org.apache.nifi.processors.standard.JoltTransformJSON.onTrigger(JoltTransformJSON.java:277)
        at 
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
        at 
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1162)
        at 
org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:205)
        at 
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        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)
Caused by: java.lang.ClassNotFoundException: 
org.sentilo.nifi.elasticsearch.ElasticsearchToOpenTSDB
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at 
org.apache.nifi.processors.standard.util.jolt.TransformFactory.getCustomTransform(TransformFactory.java:65)
        at 
org.apache.nifi.processors.standard.JoltTransformJSON.createTransform(JoltTransformJSON.java:346)
        at 
org.apache.nifi.processors.standard.JoltTransformJSON.lambda$setup$0(JoltTransformJSON.java:324)
        at 
com.github.benmanes.caffeine.cache.BoundedLocalCache$BoundedLocalLoadingCache.lambda$new$0(BoundedLocalCache.java:3366)
        ... 19 common frames omitted{noformat}

   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to