Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 53C0C18096 for ; Mon, 2 Nov 2015 21:21:28 +0000 (UTC) Received: (qmail 63377 invoked by uid 500); 2 Nov 2015 21:21:28 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 63006 invoked by uid 500); 2 Nov 2015 21:21:28 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 62946 invoked by uid 99); 2 Nov 2015 21:21:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2015 21:21:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C54DF2C1F6A for ; Mon, 2 Nov 2015 21:21:27 +0000 (UTC) Date: Mon, 2 Nov 2015 21:21:27 +0000 (UTC) From: "Vinod Kumar Vavilapalli (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-12406) AbstractMapWritable.readFields throws ClassNotFoundException with custom writables 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/HADOOP-12406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vinod Kumar Vavilapalli updated HADOOP-12406: --------------------------------------------- Target Version/s: 2.8.0, 2.7.3 (was: 2.8.0, 2.7.2) Moving this out of 2.7.2 as there's been no update in a while. > AbstractMapWritable.readFields throws ClassNotFoundException with custom writables > ---------------------------------------------------------------------------------- > > Key: HADOOP-12406 > URL: https://issues.apache.org/jira/browse/HADOOP-12406 > Project: Hadoop Common > Issue Type: Bug > Components: io > Affects Versions: 2.7.1 > Environment: Ubuntu Linux 14.04 LTS amd64 > Reporter: Nadeem Douba > Priority: Blocker > Labels: bug, hadoop, io, newbie, patch-available > Attachments: HADOOP-12406.patch > > > Note: I am not an expert at JAVA, Class loaders, or Hadoop. I am just a hacker. My solution might be entirely wrong. > AbstractMapWritable.readFields throws a ClassNotFoundException when reading custom writables. Debugging the job using remote debugging in IntelliJ revealed that the class loader being used in Class.forName() is different than that used by the Thread's current context (Thread.currentThread().getContextClassLoader()). The class path for the system class loader does not include the libraries of the job jar. However, the class path for the context class loader does. The proposed patch changes the class loading mechanism in readFields to use the Thread's context class loader instead of the system's default class loader. -- This message was sent by Atlassian JIRA (v6.3.4#6332)