marklogic / nifi

Mirror of Apache NiFi to support ongoing MarkLogic integration efforts
https://marklogic.github.io/nifi/
Apache License 2.0
12 stars 23 forks source link

NPE when using the putMarkLogic Processor #14

Closed scarton closed 3 years ago

scarton commented 6 years ago

Using the getFile processor as input, and routing the success path to putMarkLogic, I get the exception below. I provided screenshots of the configuration below. I can provide more details if needed.

2018-09-05 12:29:09,259 ERROR [Timer-Driven Process Thread-6] o.a.n.marklogic.processor.PutMarkLogic PutMarkLogic[id=aa8f272d-0165-1000-e5cf-2f888bb25b14] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.lang.NullPointerException: org.apache.nifi.processor.exception.ProcessException: java.lang.NullPointerException org.apache.nifi.processor.exception.ProcessException: java.lang.NullPointerException at org.apache.nifi.marklogic.processor.PutMarkLogic.onTrigger(PutMarkLogic.java:288) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1165) at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:203) 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.NullPointerException: null at org.apache.nifi.attribute.expression.language.StandardPropertyValue.isExpressionLanguagePresent(StandardPropertyValue.java:204) at org.apache.nifi.marklogic.processor.PutMarkLogic.buildWriteEvent(PutMarkLogic.java:347) at org.apache.nifi.marklogic.processor.PutMarkLogic.onTrigger(PutMarkLogic.java:312) at org.apache.nifi.marklogic.processor.PutMarkLogic.onTrigger(PutMarkLogic.java:284) ... 10 common frames omitted

scarton commented 6 years ago

image

scarton commented 6 years ago

image

scarton commented 6 years ago

image

mattsmith-ml commented 6 years ago

I have found that you will always get a NullPointerException if you don't add at least one collection in your PutMarkLogic processor properties (4th one down). I think this is a bug but a descriptive collection name isn't the worst addition to your data anyway :-)

scarton commented 6 years ago

Thanks - and I agree. Was just trying to get this working to test a processor I'm developing that will feed data into it. I'll add a collection name for now until there's a fix.

rjrudin commented 3 years ago

Verified that this is no longer an issue in 1.9.1.5-SNAPSHOT - was able to use PutMarkLogic on a variety of inputs without any collections being set.