Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 17613D1F6 for ; Wed, 3 Oct 2012 11:39:58 +0000 (UTC) Received: (qmail 15553 invoked by uid 500); 3 Oct 2012 11:39:53 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 15409 invoked by uid 500); 3 Oct 2012 11:39:52 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 15388 invoked by uid 99); 3 Oct 2012 11:39:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 11:39:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of harsh@cloudera.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 11:39:44 +0000 Received: by obhx4 with SMTP id x4so9414590obh.35 for ; Wed, 03 Oct 2012 04:39:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=ZYntvk7eQIvhsKrKoyPrVDYDYw5ZQdp1wBbOclS0WgQ=; b=nep8wvQCV8dpFYGlacYhdCym2gd9CF5FWxw3qe7axi7hWes/fLY1C0IK0uytzCUseY RPZgxvNgd0rLO8wr9bsslFFMFWzFHFf1jmwYVmANsECom7teq/lXrcdlwygf8+OD5MC2 fcl1uz2hYPEftoZ7Onf/TJlVMWsxVSFcSrSGKKhVdb/APfcNC8K+TDGVYbzC3zIaz55v PpEXkzdsij2jj9lEo7MmWpHqC7wTlOUGq6sqgO2CwGBg8GqEpwmb04tmkEceNST3L6RC E8p2NsfpflQkr3xr915UViaD48xJITjp+GA31YL8h9tdmUAceYRurS1EkyWwuYKzZP1H 9DTQ== Received: by 10.182.110.40 with SMTP id hx8mr1263447obb.47.1349264363316; Wed, 03 Oct 2012 04:39:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.11.168 with HTTP; Wed, 3 Oct 2012 04:39:03 -0700 (PDT) In-Reply-To: References: From: Harsh J Date: Wed, 3 Oct 2012 17:09:03 +0530 Message-ID: Subject: Re: Lib conflicts To: user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmHzkGfcEeRlVlAU1XmL/xQmlRbpa/l1vbQP923nAdGSsmvYXNsHyQXlqyUyDgcSyBm0Mqy Hi Ben, As long as the switch of libraries doesn't impact the execution of the Child task code itself, for Apache Hadoop 1.x, using the config "mapreduce.user.classpath.first" set to true may solve your trouble. On Wed, Oct 3, 2012 at 4:51 PM, Ben Rycroft wrote: > Hi all, > > I have a jar that uses the Hadoop API to launch various remote mapreduce > jobs (ie, im not using the command-line to initiate the job). The service > jar that executes the various jobs is built with maven's > "jar-with-dependencies". > > My jobs all run fine except one that uses commons-codec 1.7, I get: > > FATAL org.apache.hadoop.mapred.Child: Error running child : > java.lang.NoSuchMethodError: > org.apache.commons.codec.binary.Base64.encodeAsString([B)Ljava/lang/String; > > I think this is because my jar is including commons-codec 1.7 whereas my > Hadoop install's lib has commons-codec 1.4 ... > > Is their any way to instruct Hadoop to use the distributed commons-codec 1.7 > (I assume this is distributed as a job dependency) rather than the > commons-codec 1.4 in the hadoop 1.0.3 core lib? > > Removing commons-codec-1.4.jar from my Hadoop library folder did seem to > solve the problem for a bit, but is not working on another VM. Replacing the > 1.4 jar with the 1.7 does seem to fix the problem but this doesn't seem too > sane. Hopefully there is a better alternative. > > Thanks! -- Harsh J