[ 
https://issues.apache.org/jira/browse/NIFI-10385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Burgess updated NIFI-10385:
--------------------------------
    Status: Patch Available  (was: Open)

> 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)

Reply via email to