[
https://issues.apache.org/jira/browse/NIFI-2994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15767997#comment-15767997
]
ASF GitHub Bot commented on NIFI-2994:
--------------------------------------
Github user YolandaMDavis commented on the issue:
https://github.com/apache/nifi/pull/1303
Testing with a Rest Client API I was able to produce a null pointer
exception for the following case:
"position":{"x":null,"y":null}
"position":{"x":"","y":""}
The stack trace in both cases were the following:
`
java.lang.NullPointerException: null
at
org.apache.nifi.web.dao.impl.StandardRemoteProcessGroupDAO.updateRemoteProcessGroup(StandardRemoteProcessGroupDAO.java:376)
~[classes/:na]
at
org.apache.nifi.web.dao.impl.StandardRemoteProcessGroupDAO.createRemoteProcessGroup(StandardRemoteProcessGroupDAO.java:87)
~[classes/:na]
at
org.apache.nifi.web.dao.impl.StandardRemoteProcessGroupDAO$$FastClassBySpringCGLIB$$4a6f5661.invoke(<generated>)
~[classes/:na]
at
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.apache.nifi.audit.RemoteProcessGroupAuditor.createRemoteProcessGroupAdvice(RemoteProcessGroupAuditor.java:68)
~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.8.0_111]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:1.8.0_111]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.apache.nifi.web.dao.impl.StandardRemoteProcessGroupDAO$$EnhancerBySpringCGLIB$$97a3cf4b.createRemoteProcessGroup(<generated>)
~[classes/:na]
at
org.apache.nifi.web.StandardNiFiServiceFacade.lambda$createRemoteProcessGroup$102(StandardNiFiServiceFacade.java:1579)
~[classes/:1.2.0-SNAPSHOT]
at
org.apache.nifi.web.StandardNiFiServiceFacade.lambda$createComponent$86(StandardNiFiServiceFacade.java:1333)
~[classes/:1.2.0-SNAPSHOT]
at
org.apache.nifi.web.revision.NaiveRevisionManager.updateRevision(NaiveRevisionManager.java:121)
~[nifi-web-optimistic-locking-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
at
org.apache.nifi.web.StandardNiFiServiceFacade.createComponent(StandardNiFiServiceFacade.java:1331)
~[classes/:1.2.0-SNAPSHOT]
at
org.apache.nifi.web.StandardNiFiServiceFacade.createRemoteProcessGroup(StandardNiFiServiceFacade.java:1576)
~[classes/:1.2.0-SNAPSHOT]
at
org.apache.nifi.web.StandardNiFiServiceFacade$$FastClassBySpringCGLIB$$358780e0.invoke(<generated>)
~[classes/:1.2.0-SNAPSHOT]
at
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.apache.nifi.web.NiFiServiceFacadeLock.createLock(NiFiServiceFacadeLock.java:41)
~[classes/:1.2.0-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.8.0_111]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:1.8.0_111]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_111]
`
The RPG was created successfully when position x & y values were populated
and when the position attribute was not included in the payload
> Rest Api - Assumes component position is specified
> --------------------------------------------------
>
> Key: NIFI-2994
> URL: https://issues.apache.org/jira/browse/NIFI-2994
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Matt Gilman
> Assignee: Matt Gilman
> Priority: Minor
> Fix For: 1.2.0
>
>
> Which can lead to an NPE. If the position is not specified we should likely
> default it to some value (like 0, 0).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)