Return-Path: X-Original-To: apmail-falcon-dev-archive@minotaur.apache.org Delivered-To: apmail-falcon-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CF2121024A for ; Tue, 3 Mar 2015 18:18:26 +0000 (UTC) Received: (qmail 77291 invoked by uid 500); 3 Mar 2015 18:18:26 -0000 Delivered-To: apmail-falcon-dev-archive@falcon.apache.org Received: (qmail 77245 invoked by uid 500); 3 Mar 2015 18:18:26 -0000 Mailing-List: contact dev-help@falcon.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.apache.org Delivered-To: mailing list dev@falcon.apache.org Received: (qmail 77234 invoked by uid 99); 3 Mar 2015 18:18:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 18:18:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 03 Mar 2015 18:18:24 +0000 Received: (qmail 76564 invoked by uid 99); 3 Mar 2015 18:18:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 18:18:04 +0000 Date: Tue, 3 Mar 2015 18:18:04 +0000 (UTC) From: "Balu Vellanki (JIRA)" To: dev@falcon.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FALCON-1063) Falcon CLI list entities operation throws NullPointerException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FALCON-1063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14345432#comment-14345432 ] Balu Vellanki commented on FALCON-1063: --------------------------------------- [~sriksun] - I am working on migration steps today. I will take up this Jira. > Falcon CLI list entities operation throws NullPointerException > -------------------------------------------------------------- > > Key: FALCON-1063 > URL: https://issues.apache.org/jira/browse/FALCON-1063 > Project: Falcon > Issue Type: Bug > Components: client > Affects Versions: 0.6, trunk > Reporter: Georgi Ivanov > Assignee: Balu Vellanki > > Using falcon v0.6 and doing list entities I receive NullPointerException. This happens only on falcon installations that had existing entities and got upgraded to 0.6. I run: > falcon entity -type cluster -list > falcon entity -type process -list > and I get this on console: > Stacktrace: > org.apache.falcon.client.FalconCLIException: Bad Request;null > at org.apache.falcon.client.FalconCLIException.fromReponse(FalconCLIException.java:44) > at org.apache.falcon.client.FalconClient.checkIfSuccessful(FalconClient.java:1172) > at org.apache.falcon.client.FalconClient.sendListRequest(FalconClient.java:791) > at org.apache.falcon.client.FalconClient.getEntityList(FalconClient.java:374) > at org.apache.falcon.cli.FalconCLI.entityCommand(FalconCLI.java:412) > at org.apache.falcon.cli.FalconCLI.run(FalconCLI.java:183) > at org.apache.falcon.cli.FalconCLI.main(FalconCLI.java:133) > The stacktrace on the server shows: > 2015-03-03 04:14:06,462 ERROR - [683216314@qtp-1027439921-0:68e05a5c-95cb-46fb-a9f0-a7280e491dc2 falcon:GET//entities/list/process] ~ Failed to get entity list (AbstractEntityManager:532) > java.lang.NullPointerException > at org.apache.falcon.resource.AbstractEntityManager.tryProxy(AbstractEntityManager.java:353) > at org.apache.falcon.resource.AbstractEntityManager.getEntities(AbstractEntityManager.java:583) > at org.apache.falcon.resource.AbstractEntityManager.getEntityList(AbstractEntityManager.java:530) > at org.apache.falcon.resource.proxy.SchedulableEntityManagerProxy.getEntityList(SchedulableEntityManagerProxy.java:405) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) > 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:288) > 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:1469) > at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221) > at org.apache.falcon.security.FalconAuthorizationFilter.doFilter(FalconAuthorizationFilter.java:102) > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) > at org.apache.falcon.security.FalconAuthenticationFilter$2.doFilter(FalconAuthenticationFilter.java:184) > at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:572) > at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:542) > at org.apache.falcon.security.FalconAuthenticationFilter.doFilter(FalconAuthenticationFilter.java:193) > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) > at org.apache.falcon.security.FalconAuditFilter.doFilter(FalconAuditFilter.java:65) > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) > at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) > at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) > at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:767) > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) > at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) > at org.mortbay.jetty.Server.handle(Server.java:326) > at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) > at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) > at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) > 2015-03-03 04:14:06,463 ERROR - [683216314@qtp-1027439921-0:68e05a5c-95cb-46fb-a9f0-a7280e491dc2 falcon:GET//entities/list/process] ~ Action failed: Bad Request > Error: null (FalconWebException:68) > This happened when upgrading falcon to 0.6. Cluster/process definitions do not contain ACLs. Looking at AbstractEntityManager.java source the problem is obvious: > > private void tryProxy(Entity entity) throws IOException, FalconException { > final String aclOwner = entity.getACL().getOwner(); > final String aclGroup = entity.getACL().getGroup(); > tryProxy method does not check if entity.getACL() returns null. There is a method called decorateEntityWithACL which is used as a kludge before invoking tryProxy method and it populates entities with some sample ACL and tryProxy does not throw null pointer exception. This is done in submitInternal() and update() methods in AbstractEntityManager.java, which are called when we call submit or update. However the list CLI operation calls getEntities() method, which calls tryProxy() but does not "decorate" the entity with decorateEntityWithACL() and hence we get NullPointerException. > This bug affects falcon UI as well. I checked trunk and it is not fixed there as well. This bug won't manifest on entities created on falcon 0.6 because falcon "injects" ACLs into the entity definition before saving it to Configuration Store if it does not have one already. -- This message was sent by Atlassian JIRA (v6.3.4#6332)