Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFA85181A9 for ; Tue, 9 Feb 2016 15:46:18 +0000 (UTC) Received: (qmail 12885 invoked by uid 500); 9 Feb 2016 15:46:18 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 12757 invoked by uid 500); 9 Feb 2016 15:46:18 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 12538 invoked by uid 99); 9 Feb 2016 15:46:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2016 15:46:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 264172C1F5C for ; Tue, 9 Feb 2016 15:46:18 +0000 (UTC) Date: Tue, 9 Feb 2016 15:46:18 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-3271) Using webhdfs in a flink topology throws classnotfound exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-3271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15139089#comment-15139089 ] ASF GitHub Bot commented on FLINK-3271: --------------------------------------- Github user StephanEwen commented on the pull request: https://github.com/apache/flink/pull/1543#issuecomment-181920795 I think we can merge this, with the changes suggested in the inline comments... > Using webhdfs in a flink topology throws classnotfound exception > ---------------------------------------------------------------- > > Key: FLINK-3271 > URL: https://issues.apache.org/jira/browse/FLINK-3271 > Project: Flink > Issue Type: Bug > Components: Core > Affects Versions: 0.10.1 > Reporter: Abhishek Agarwal > Assignee: Abhishek Agarwal > > I was just trying to run a storm topology on flink using flink-storm. I got this exception - > {noformat} > Caused by: java.lang.NoClassDefFoundError: org/mortbay/util/ajax/JSON > at org.apache.hadoop.hdfs.web.WebHdfsFileSystem.jsonParse(WebHdfsFileSystem.java:325) > at org.apache.hadoop.hdfs.web.WebHdfsFileSystem$FsPathResponseRunner.getResponse(WebHdfsFileSystem.java:727) > at org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner.runWithRetry(WebHdfsFileSystem.java:610) > at org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner.access$100(WebHdfsFileSystem.java:458) > at org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner$1.run(WebHdfsFileSystem.java:487) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628) > at org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner.run(WebHdfsFileSystem.java:483) > at org.apache.hadoop.hdfs.web.WebHdfsFileSystem.listStatus(WebHdfsFileSystem.java:1277) > {noformat} > My topology list some files on hdfs using webhdfs API. org.mortbay.util.ajax.JSON was included in the application uber jar. I noticed that flink loads the application jar in a child classloader. This is what most likely happened - > 1. WebHdfsFileSystem class was loaded through parent class loader since it is included in flink-dist.jar. > 2. WebHdfsFileSystem has reference to the org.mortbay.util.ajax.JSON but since it is loaded through parent class loader, WebHdfsFileSystem can't read a class in child class loader. > Ideally all the referenced classes should be available in the distribution jar so that these sort of issues may not occur. -- This message was sent by Atlassian JIRA (v6.3.4#6332)