Hi all,
[Nifi-1.10.0]
I added an InvokeScriptedProcessor to my Process Group. When I added the
groovy script as the body to the processor, the frontend kicked me out with
a generic error message and a link to nifi-home.
I can navigate to home and to other PGs but every time I try to get into my
PG, I get the same generic error message: An unexpected error has occurred.
Please check the logs for additional details
I went hunting into the logs and I found the following
------------------------------------------------------------------------------------------------------------------------------------------------
2021-03-11 14:21:50,898 ERROR [Validate Components Thread-1]
o.a.n.p.script.InvokeScriptedProcessor
InvokeScriptedProcessor[id=20352751-317b-16e1-4831-8022edecab6c] Unable to
validate the script Processor: java.lang.RuntimeException: java
.lang.NullPointerException: java.lang.RuntimeException:
java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.invokeImplSafe(GroovyScriptEngineImpl.java:382)
at
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.access$200(GroovyScriptEngineImpl.java:94)
at
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl$4.invoke(GroovyScriptEngineImpl.java:423)
at com.sun.proxy.$Proxy119.validate(Unknown Source)
at
org.apache.nifi.processors.script.InvokeScriptedProcessor.customValidate(InvokeScriptedProcessor.java:491)
at
org.apache.nifi.components.AbstractConfigurableComponent.validate(AbstractConfigurableComponent.java:128)
at
org.apache.nifi.controller.AbstractComponentNode.computeValidationErrors(AbstractComponentNode.java:602)
at
org.apache.nifi.controller.StandardProcessorNode.computeValidationErrors(StandardProcessorNode.java:1057)
at
org.apache.nifi.controller.AbstractComponentNode.performValidation(AbstractComponentNode.java:569)
at
org.apache.nifi.controller.AbstractComponentNode.performValidation(AbstractComponentNode.java:583)
at
org.apache.nifi.components.validation.StandardValidationTrigger.trigger(StandardValidationTrigger.java:52)
at
org.apache.nifi.components.validation.StandardValidationTrigger.lambda$triggerAsync$0(StandardValidationTrigger.java:45)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
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)
Caused by: java.lang.NullPointerException: null
at
org.apache.nifi.components.AbstractConfigurableComponent.validate(AbstractConfigurableComponent.java:90)
at sun.reflect.GeneratedMethodAccessor1079.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1217)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:1011)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:994)
at
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.invokeImplSafe(GroovyScriptEngineImpl.java:377)
... 19 common frames omitted
2021-03-11 14:21:50,899 ERROR [Validate Components Thread-1]
o.a.n.controller.StandardProcessorNode Failed to perform validation
java.lang.ClassCastException: java.util.ArrayList cannot be cast to
org.apache.nifi.processor.Relationship
at
org.apache.nifi.controller.StandardProcessorNode.getUndefinedRelationships(StandardProcessorNode.java:992)
at
org.apache.nifi.controller.StandardProcessorNode.computeValidationErrors(StandardProcessorNode.java:1064)
at
org.apache.nifi.controller.AbstractComponentNode.performValidation(AbstractComponentNode.java:569)
at
org.apache.nifi.controller.AbstractComponentNode.performValidation(AbstractComponentNode.java:583)
at
org.apache.nifi.components.validation.StandardValidationTrigger.trigger(StandardValidationTrigger.java:52)
at
org.apache.nifi.components.validation.StandardValidationTrigger.lambda$triggerAsync$0(StandardValidationTrigger.java:45)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
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)
------------------------------------------------------------------------------------------------------------------------------------------------
After a that, the following error repeated constantly
------------------------------------------------------------------------------------------------------------------------------------------------
2021-03-11 14:22:16,018 ERROR [Validate Components Thread-2]
o.a.n.controller.StandardProcessorNode Failed to perform validation
java.lang.ClassCastException: null
------------------------------------------------------------------------------------------------------------------------------------------------
I disabled the entire PG to see if I could navigate inside and delete the
processor but still shows the same error. There is nothing being recorded
in the log regarding the error.
I have tried using CURL to see if I can manually delete the processor but I
cannot retrieve it. The response is the generic error message (also,
nothing is showing in the logs).
curl -X GET http://127.0.0.1:8080/nifi-api/processors/the-uuid
I cannot run a DELETE because I do not have the revision number (and I
don't know how to get it other than the previous get request).
I also tried to generate a template of the PG so that I could manually edit
the XML and remove all references to the processor but I am getting the
same error message.
*Does anyone know which other avenues I have to get rid of the processor?*
I have found in NiFi version 1.13.1 that ticket NIFI-8266
<https://issues.apache.org/jira/browse/NIFI-8266> seems to be related. I am
afraid that if I shut down the service, I will not be able to get it back
online, however, I am willing to upgrade *as a last resort*. If upgrading
were necessary, can I jump from 1.10.0 straight into 1.13.1?
--
Best regards,
*Santiago*