Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-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 31867D8B0 for ; Thu, 30 Aug 2012 10:23:52 +0000 (UTC) Received: (qmail 52683 invoked by uid 500); 30 Aug 2012 10:23:47 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 51844 invoked by uid 500); 30 Aug 2012 10:23:43 -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 51821 invoked by uid 99); 30 Aug 2012 10:23:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 10:23:43 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_IMAGE_ONLY_20,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of visioner.sadak@gmail.com designates 74.125.83.48 as permitted sender) Received: from [74.125.83.48] (HELO mail-ee0-f48.google.com) (74.125.83.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 10:23:36 +0000 Received: by eekd41 with SMTP id d41so692234eek.35 for ; Thu, 30 Aug 2012 03:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:x-goomoji-body:date:message-id :subject:from:to:content-type; bh=2777Fbl02Le+yiyM7nnkM/HghlgyZmKbCTO4hrft/C4=; b=OqMrsLWSnEN58m2nBtQHPfpla5Eacw2i+ENZq97VUATh3cQLzfmtFAobdLQas42CrL o9OymKUcNdNl7rATah6iE4+poUeZhp627+0lSZfwtQxOWpiOS9HDAaN7LpMW1W4lyP32 onKwTWZwM/EPxR2FLsu+SfAjb71OL2du++Ft1ICP7p2j59G8yWCJdsbJCqsLaSCkMrLb qE7LUJtBYb5kfLp+jFBJBJKQXrkQGBOu/bazRCaqGYNBBQYxljD0vhEXActYSqnXoZQV Y2wWvK28pq8CS0NV648KSCNowC9xcZs7GUugdhEb8tmbU72QLla3od9TvkORN7P6XQi8 JaDg== MIME-Version: 1.0 Received: by 10.14.181.132 with SMTP id l4mr5906497eem.17.1346322195725; Thu, 30 Aug 2012 03:23:15 -0700 (PDT) Received: by 10.14.220.134 with HTTP; Thu, 30 Aug 2012 03:23:15 -0700 (PDT) In-Reply-To: References: X-Goomoji-Body: true Date: Thu, 30 Aug 2012 15:53:15 +0530 Message-ID: Subject: Re: Integrating hadoop with java UI application deployed on tomcat From: Visioner Sadak To: user@hadoop.apache.org Content-Type: multipart/related; boundary=047d7b343db63abbae04c87910e6 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b343db63abbae04c87910e6 Content-Type: multipart/alternative; boundary=047d7b343db63abbac04c87910e5 --047d7b343db63abbac04c87910e5 Content-Type: text/plain; charset=ISO-8859-1 Tried puttin it still same error [?] On Thu, Aug 30, 2012 at 3:06 PM, John Hancock wrote: > You might need to put the apache commons configuration library jar in > web-inf/lib to clear this error. > > > On Thu, Aug 30, 2012 at 4:32 AM, Visioner Sadak wrote: > >> Hi, >> >> I have a WAR which is deployed on tomcat server the WAR contains some >> java classes which uploads files, will i be able to upload directly in to >> hadoop iam using the below code in one of my java class >> >> Configuration hadoopConf=new Configuration(); >> //get the default associated file system >> FileSystem fileSystem=FileSystem.get(hadoopConf); >> // HarFileSystem harFileSystem= new HarFileSystem(fileSystem); >> //copy from lfs to hdfs >> fileSystem.copyFromLocalFile(new Path("E:/test/GANI.jpg"),new >> Path("/user/TestDir/")); >> >> but its throwing up this error >> >> java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration >> >> when this code is run independtly using a single jar deployed in hadoop >> bin it wrks fine >> >> >> > > --047d7b343db63abbac04c87910e5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Tried puttin it still same error

On Thu, Aug 30, 2012 at 3:06 PM, John Hancock <jhancock1975@gmail.com> wrote:
You might need to put the apache comm= ons configuration library jar in web-inf/lib to clear this error.=20


On Thu, Aug 30, 2012 at 4:32 AM, Visioner Sadak = <visioner.sadak@gmail.com> wrote:
Hi,
=A0
=A0 I have a WAR which is deployed on tomcat server the WAR contains s= ome java classes which uploads files, will i be able to upload directly in = to hadoop iam using the below code in one of my java class
=A0
=A0=A0=A0=A0=A0=A0 Configuration hadoopConf=3Dnew Configuration();
= =A0=A0=A0=A0=A0=A0=A0 //get the default associated file system
=A0=A0=A0= =A0=A0=A0 FileSystem fileSystem=3DFileSystem.get(hadoopConf);=A0=A0=A0=A0= =A0=A0=A0
=A0=A0=A0=A0=A0=A0 // HarFileSystem harFileSystem=3D new HarF= ileSystem(fileSystem);
=A0=A0=A0=A0=A0=A0=A0 //copy from lfs to hdfs
=A0=A0=A0=A0=A0=A0 fileSys= tem.copyFromLocalFile(new Path("E:/test/GANI.jpg"),new Path("= ;/user/TestDir/"));
=A0
but its throwing up this error

java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration

when this code is run independtly using a single jar deployed in hadoop = bin it wrks fine

=A0



--047d7b343db63abbac04c87910e5-- --047d7b343db63abbae04c87910e6 Content-Type: image/gif; name="33F.gif" Content-Transfer-Encoding: base64 X-Attachment-Id: 33F@goomoji.gmail Content-ID: <33F@goomoji.gmail> R0lGODlhDAAMAKIFAABGdPT7/wAAAFuw7MPj9////wAAAAAAACH5BAEAAAUALAAAAAAMAAwAAAMp WLPcGjDKFYi9l+KtCbCfpQGCJYSaUBKqOFRb9l5A6MKh3cXEoDTAQgIAOw== --047d7b343db63abbae04c87910e6--