Mathias Krueger created NIFI-7491:
-------------------------------------

             Summary: Update parameter context with unchanged parameter results 
in an exception
                 Key: NIFI-7491
                 URL: https://issues.apache.org/jira/browse/NIFI-7491
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
    Affects Versions: 1.11.4
            Reporter: Mathias Krueger


If a parameter context is updated and it contains a parameter that has not been 
changed by the user the update results in the following exception in the 
logfile.
{code:java}
java.lang.IllegalStateException: Cannot update Parameter Context testcontext 
because it has Parameters that are being referenced by a Processor that is 
running. at 
org.apache.nifi.web.dao.impl.StandardParameterContextDAO.verifyParameterUpdate(StandardParameterContextDAO.java:194)
 at 
org.apache.nifi.web.dao.impl.StandardParameterContextDAO.verifyUpdate(StandardParameterContextDAO.java:153)
 at 
org.apache.nifi.web.dao.impl.StandardParameterContextDAO$$FastClassBySpringCGLIB$$7099e091.invoke(<generated>)
 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671)
 at 
org.apache.nifi.web.dao.impl.StandardParameterContextDAO$$EnhancerBySpringCGLIB$$96a5318c.verifyUpdate(<generated>)
 at 
org.apache.nifi.web.StandardNiFiServiceFacade.verifyUpdateParameterContext(StandardNiFiServiceFacade.java:1004)
 at 
org.apache.nifi.web.StandardNiFiServiceFacade$$FastClassBySpringCGLIB$$358780e0.invoke(<generated>)
 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:84)
 at 
org.apache.nifi.web.NiFiServiceFacadeLock.proceedWithReadLock(NiFiServiceFacadeLock.java:161)
 at 
org.apache.nifi.web.NiFiServiceFacadeLock.verifyLock(NiFiServiceFacadeLock.java:138)
 at jdk.internal.reflect.GeneratedMethodAccessor339.invoke(Unknown Source) at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:566) at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
 at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
 at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671)
 at 
org.apache.nifi.web.StandardNiFiServiceFacade$$EnhancerBySpringCGLIB$$a1cdcf58.verifyUpdateParameterContext(<generated>)
 at 
org.apache.nifi.web.api.ParameterContextResource.performParameterContextUpdate(ParameterContextResource.java:931)
 at 
org.apache.nifi.web.api.ParameterContextResource.updateParameterContext(ParameterContextResource.java:867)
 at 
org.apache.nifi.web.api.ParameterContextResource.lambda$submitUpdateRequest$17(ParameterContextResource.java:804)
 at 
org.apache.nifi.web.api.concurrent.AsyncRequestManager$2.run(AsyncRequestManager.java:117)
 at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 at java.base/java.lang.Thread.run(Thread.java:834){code}
The user gets the following error message in UI: 
{code:java}
Unable to complete parameter context update request: Failed to update Parameter 
Context due to java.lang.IllegalStateException: Cannot update Parameter Context 
testcontext because it has Parameters that are being referenced by a Processor 
that is running.{code}
 

 

If the paramter contains changes, the update process runs as expected.

So the expected behavior would be to do the update even if the paramater didnt 
change, or to do no updates and complete the update request without an error 
message.

 

this is reproducible with the folowing steps:
 # edit a paramater context that contains parameters that are bound to running 
processors.
 # change the value of the parameter and submit the Edit Parameter dialog
 # reopen the Edit Parameter dialog and change the value back to the original 
value and submit the dialog
 # submit the Edit Parameter Context dialog

 


  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to