[ 
https://issues.apache.org/jira/browse/ATLAS-4481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17444875#comment-17444875
 ] 

ASF subversion and git services commented on ATLAS-4481:
--------------------------------------------------------

Commit 5754a929096efaa33c10853c8d699972bb4baf4c in atlas's branch 
refs/heads/branch-2.0 from Sidharth Mishra
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=5754a92 ]

ATLAS-4481: Fixed NPE at Atlas API on update classifications without propagate 
flag

Signed-off-by: Sidharth Mishra <[email protected]>
(cherry picked from commit 7211f4724fe827ebec1a6c1891a9b46b72f3553f)


> Atlas API on update classifications is failing with NPE when we pass body 
> without propagate flag
> ------------------------------------------------------------------------------------------------
>
>                 Key: ATLAS-4481
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4481
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: Sidharth Kumar Mishra
>            Assignee: Sidharth Kumar Mishra
>            Priority: Major
>         Attachments: ATLAS-4481..patch
>
>
> Curl:
> curl --location --request PUT 
> 'http://atlas-host:31000/api/atlas/v2/entity/guid/86ed9144-dc1d-4c5a-8f04-836cf6c9fc4b/classifications'
>  \
> --header 'Content-Type: application/json' \
> --header 'Cookie: ATLASSESSIONID=node0xhfij9kxtpwo1fuxrfem3u7u11.node0' \
> --data-raw '[
> {
> "typeName": "PII_STATUS",
> "attributes": {
> "status": "accepted"
> }
> }
> ]'
>  
> Response : [
> {"success":false,"guid":"86ed9144-dc1d-4c5a-8f04-836cf6c9fc4b","err":"Unexpected
>  error from Atlas: Received "}
> ]
>  
> NPE Details from Atlas log:
> ea4c-411c-913b-edce4b6ecd4f/classifications?doAs=alpha_stagecookieuser 
> (AtlasAuthenticationFilter$KerberosFilterChainWrapper:800)
> 2021-11-10 11:09:08,670 ERROR - [etp1632682988-593 - 
> 76b982fc-8582-49f2-98f3-6f103af81188:knox:PUT/api/atlas/v2/entity/guid/5a49aab9-ea4c-411c-913b-edce4b6ecd4f/classifications]
>  ~ graph rollback due to exception  (GraphTransactionInterceptor:200)
> java.lang.NullPointerException
>  at 
> org.apache.atlas.repository.store.graph.v2.EntityGraphMapper.updateClassifications(EntityGraphMapper.java:2411)
>  at 
> org.apache.atlas.repository.store.graph.v2.EntityGraphMapper$$FastClassBySpringCGLIB$$8e3f1c72.invoke(<generated>)
>  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
>  at 
> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:668)
>  at 
> org.apache.atlas.repository.store.graph.v2.EntityGraphMapper$$EnhancerBySpringCGLIB$$5bec6507.updateClassifications(<generated>)
>  at 
> org.apache.atlas.repository.store.graph.v2.AtlasEntityStoreV2.updateClassifications(AtlasEntityStoreV2.java:721)
>  at 
> org.apache.atlas.repository.store.graph.v2.AtlasEntityStoreV2$$FastClassBySpringCGLIB$$6861dca9.invoke(<generated>)
>  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
>  at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:737)
>  at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>  at 
> org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:111)
>  at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>  at 
> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672)
>  at 
> org.apache.atlas.repository.store.graph.v2.AtlasEntityStoreV2$$EnhancerBySpringCGLIB$$2c77000c.updateClassifications(<generated>)
>  at 
> org.apache.atlas.web.rest.EntityREST.updateClassifications(EntityREST.java:586)
>  at 
> org.apache.atlas.web.rest.EntityREST$$FastClassBySpringCGLIB$$31581d5e.invoke(<generated>)
>  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
>  at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:737)
>  at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>  at 
> org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:84)
>  at 
> org.apache.atlas.web.service.TimedAspectInterceptor.timerAdvice(TimedAspectInterceptor.java:46)
>  at sun.reflect.GeneratedMethodAccessor165.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: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:168)
>  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:672)
>  at 
> org.apache.atlas.web.rest.EntityREST$$EnhancerBySpringCGLIB$$345affc6.updateClassifications(<generated>)
>  at sun.reflect.GeneratedMethodAccessor372.invoke(Unknown Source)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
>  at 
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$VoidOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:167)
>  at 
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>  at 
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
>  at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>  at 
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
>  at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>  at 
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
>  at 
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
>  at 
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
>  at 
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
>  at 
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
>  at 
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
>  at 
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
>  at 
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>  at 
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1452)
>  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
>  at org.apache.atlas.web.filters.AuditFilter.doFilter(AuditFilter.java:106)
>  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
>  at 
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
>  at 
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.apache.atlas.web.filters.AtlasCSRFPreventionFilter$ServletFilterHttpInteraction.proceed(AtlasCSRFPreventionFilter.java:250)
>  at 
> org.apache.atlas.web.filters.AtlasCSRFPreventionFilter.handleHttpInteraction(AtlasCSRFPreventionFilter.java:192)
>  at 
> org.apache.atlas.web.filters.AtlasCSRFPreventionFilter.doFilter(AtlasCSRFPreventionFilter.java:205)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.apache.atlas.web.filters.AtlasAuthenticationFilter$KerberosFilterChainWrapper.doFilter(AtlasAuthenticationFilter.java:802)
>  at 
> org.apache.atlas.web.filters.AtlasAuthenticationFilter.doKerberosAuth(AtlasAuthenticationFilter.java:545)
>  at 
> org.apache.atlas.web.filters.AtlasAuthenticationFilter.doFilter(AtlasAuthenticationFilter.java:389)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.apache.atlas.web.filters.StaleTransactionCleanupFilter.doFilter(StaleTransactionCleanupFilter.java:55)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
>  at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.apache.atlas.web.filters.AtlasKnoxSSOAuthenticationFilter.doFilter(AtlasKnoxSSOAuthenticationFilter.java:142)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
>  at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
>  at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  at 
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
>  at 
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
>  at 
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
>  at 
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
>  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
>  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>  at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
>  at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
>  at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
>  at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
>  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
>  at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
>  at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>  at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>  at org.eclipse.jetty.server.Server.handle(Server.java:516)
>  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
>  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
>  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
>  at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:279)
>  at 
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
>  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
>  at 
> org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
>  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
>  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
>  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
>  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
>  at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
>  at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
>  at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
>  at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
>  at 
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
>  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)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to