You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/08/23 02:36:00 UTC
[jira] [Commented] (NIFI-10385) ScriptedLookupService failing with NullPointerException upon creation
[ https://issues.apache.org/jira/browse/NIFI-10385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17583303#comment-17583303 ]
ASF subversion and git services commented on NIFI-10385:
--------------------------------------------------------
Commit cb275dd956010be6e43ecf7090981b20a1fc2180 in nifi's branch refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=cb275dd956 ]
NIFI-10385: If script body is empty for AbstractScriptedControllerService or InvokeScriptedProcessor, do not attempt to load script
Signed-off-by: Matthew Burgess <ma...@apache.org>
This closes #6324
> ScriptedLookupService failing with NullPointerException upon creation
> ---------------------------------------------------------------------
>
> Key: NIFI-10385
> URL: https://issues.apache.org/jira/browse/NIFI-10385
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Fix For: 1.18.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> If I create a ScriptedLookupService, it immediately becomes invalid and I get the following error in the logs:
> {code:java}
> 022-08-19 16:11:30,636 ERROR [NiFi Web Server-25] o.a.n.l.script.ScriptedLookupService ScriptedLookupService[id=69930969-6e56-350b-7d0c-5b496315cf5e] Unable to load script: null
> java.lang.NullPointerException: null
> at java.util.Objects.requireNonNull(Objects.java:203)
> at jdk.nashorn.internal.runtime.Source$RawData.<init>(Source.java:169)
> at jdk.nashorn.internal.runtime.Source$RawData.<init>(Source.java:158)
> at jdk.nashorn.internal.runtime.Source.sourceFor(Source.java:429)
> at jdk.nashorn.internal.runtime.Source.sourceFor(Source.java:440)
> at jdk.nashorn.api.scripting.NashornScriptEngine.makeSource(NashornScriptEngine.java:226)
> at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
> at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
> at org.apache.nifi.script.impl.JavascriptScriptRunner.run(JavascriptScriptRunner.java:39)
> at org.apache.nifi.lookup.script.BaseScriptedLookupService.reloadScript(BaseScriptedLookupService.java:281)
> at org.apache.nifi.script.AbstractScriptedControllerService.reloadScriptBody(AbstractScriptedControllerService.java:195)
> at org.apache.nifi.lookup.script.BaseScriptedLookupService.setup(BaseScriptedLookupService.java:246)
> at org.apache.nifi.script.AbstractScriptedControllerService.onConfigurationRestored(AbstractScriptedControllerService.java:123)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 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:145)
> at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:133)
> at org.apache.nifi.util.ReflectionUtils.quietlyInvokeMethodsWithAnnotations(ReflectionUtils.java:316)
> at org.apache.nifi.util.ReflectionUtils.quietlyInvokeMethodsWithAnnotation(ReflectionUtils.java:93)
> at org.apache.nifi.controller.flow.StandardFlowManager.createControllerService(StandardFlowManager.java:500)
> at org.apache.nifi.flow.synchronization.StandardVersionedComponentSynchronizer.addControllerService(StandardVersionedComponentSynchronizer.java:1078)
> at org.apache.nifi.flow.synchronization.StandardVersionedComponentSynchronizer.synchronizeControllerServices {code}
> At this point, the service cannot be used until a value is set for the script and then NiFi is subsequently restarted, as it remains in this state, even after changing the property value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)