Daniel Chaffelson created NIFI-4865:
---------------------------------------

             Summary: Registry API command Create Version can produce a 
VersionedProcessGroup that causes NiFi to NPE on Version change
                 Key: NIFI-4865
                 URL: https://issues.apache.org/jira/browse/NIFI-4865
             Project: Apache NiFi
          Issue Type: Bug
          Components: Flow Versioning
    Affects Versions: 1.5.0
         Environment: NiFi Docker 1.5.0 / NiFi-Registry Docker 0.1.0
            Reporter: Daniel Chaffelson


I imported a complex (300kb) xml template into NiFi and placed it under version 
control using the typical GUI commands.

Then using the Registry API command 'create version', I instructed it to make a 
zero change new version, resulting in ver1 and ver2 being in the same bucket 
and flow object.

Returning to the GUI, I instructed it to update to the new version, which 
causes the below NPE.

I have retested this with a fresh environment and am able to reproduce it at 
will, though as the template belongs to a client and is very detailed I cannot 
in good faith share it directly on a public service - I am happy to supply it 
directly in the interests of locking down this bug.
{noformat}
2018-02-09 21:45:40,900 INFO [Version Control Update Thread-1] 
o.a.nifi.groups.StandardProcessGroup Updating 
StandardProcessGroup[identifier=420d499d-2b1d-3af8-6cc3-2722817f4d49] to 
VersionedFlowSnapshot[flowId=e799c617-0dd9-4685-b471-2987b19ad121, 
flowName=test1, version=2, comments=null]; there are 0 differences to take into 
account:

2018-02-09 21:45:40,903 INFO [Version Control Update Thread-1] 
org.apache.nifi.web.api.VersionsResource Successfully updated flow; re-enabling 
0 Controller Services
2018-02-09 21:45:40,903 INFO [Version Control Update Thread-1] 
org.apache.nifi.web.api.VersionsResource Restarting 0 Processors
2018-02-09 21:45:40,903 ERROR [Version Control Update Thread-1] 
org.apache.nifi.web.api.VersionsResource Failed to update flow to new version
java.lang.NullPointerException: null
at 
org.apache.nifi.groups.StandardProcessGroup.updateConnection(StandardProcessGroup.java:3784)
at 
org.apache.nifi.groups.StandardProcessGroup.updateProcessGroup(StandardProcessGroup.java:3656)
at 
org.apache.nifi.groups.StandardProcessGroup.updateProcessGroup(StandardProcessGroup.java:3488)
at 
org.apache.nifi.groups.StandardProcessGroup.updateFlow(StandardProcessGroup.java:3295)
at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO.updateProcessGroupFlow(StandardProcessGroupDAO.java:279)
at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO$$FastClassBySpringCGLIB$$10a99b47.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at 
org.apache.nifi.audit.ProcessGroupAuditor.updateProcessGroupFlowAdvice(ProcessGroupAuditor.java:258)
at sun.reflect.GeneratedMethodAccessor644.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
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:673)
at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO$$EnhancerBySpringCGLIB$$3bf4fdb8.updateProcessGroupFlow(<generated>)
at 
org.apache.nifi.web.StandardNiFiServiceFacade$13.update(StandardNiFiServiceFacade.java:4304)
at 
org.apache.nifi.web.revision.NaiveRevisionManager.updateRevision(NaiveRevisionManager.java:120)
at 
org.apache.nifi.web.StandardNiFiServiceFacade.updateProcessGroupContents(StandardNiFiServiceFacade.java:4300)
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:738)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at 
org.apache.nifi.web.NiFiServiceFacadeLock.proceedWithWriteLock(NiFiServiceFacadeLock.java:173)
at 
org.apache.nifi.web.NiFiServiceFacadeLock.updateLock(NiFiServiceFacadeLock.java:66)
at sun.reflect.GeneratedMethodAccessor345.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
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:673)
at 
org.apache.nifi.web.StandardNiFiServiceFacade$$EnhancerBySpringCGLIB$$9b0a1745.updateProcessGroupContents(<generated>)
at 
org.apache.nifi.web.api.VersionsResource.updateFlowVersion(VersionsResource.java:1460)
at 
org.apache.nifi.web.api.VersionsResource.lambda$null$18(VersionsResource.java:1127)
at 
org.apache.nifi.web.api.concurrent.AsyncRequestManager$2.run(AsyncRequestManager.java:109)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
2018-02-09 21:46:38,903 INFO [Timer-Driven Process Thread-2] 
o.a.nifi.groups.StandardProcessGroup 
StandardProcessGroup[identifier=420d499d-2b1d-3af8-6cc3-2722817f4d49] is not 
the most recent version of the flow that is under Version Control; current 
version is 1; most recent version is 2{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to