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 46DA0D7BD for ; Thu, 30 Aug 2012 08:32:44 +0000 (UTC) Received: (qmail 47908 invoked by uid 500); 30 Aug 2012 08:32:39 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 47819 invoked by uid 500); 30 Aug 2012 08:32:39 -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 47806 invoked by uid 99); 30 Aug 2012 08:32:38 -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 08:32:38 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,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 209.85.215.176 as permitted sender) Received: from [209.85.215.176] (HELO mail-ey0-f176.google.com) (209.85.215.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 08:32:32 +0000 Received: by eabd1 with SMTP id d1so493085eab.35 for ; Thu, 30 Aug 2012 01:32:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=5AVh1O1dYaDdvKhWb69nJtUkEnRkS8POt9ey2k2tgPs=; b=OiqI9IqhTAuCNE09dBC5JQPw/b8Ls6Tw07dEADsTW/cMsyXrAdVMiRq4eOOTygTPx1 eP/MS6DKxCRW/t2AvRkx0MM3ea+WMK0zmhgFHE0CNPoJK2r81bYHMtm3cGzqoUFnCGR0 vHu18xe5SRc4qV370/dczY9umvmnonJPNMpQdSxF8CzcdR52Q/Sxgc5qZUmIWkgjzs+s 33E+JuW1z9VfpOciq2jT+vJStVSgqrFRHBW51+CSC45bjFiWdxHuX+0hrM0dIFZs96qO N1tsE3U3fQqB3B+yWIKtOako++xt36YfPMOKIDPPRyB9jBlY9m3J+2HpIdWQjTdcrDF6 1/Kg== MIME-Version: 1.0 Received: by 10.14.172.193 with SMTP id t41mr5459028eel.25.1346315531349; Thu, 30 Aug 2012 01:32:11 -0700 (PDT) Received: by 10.14.220.134 with HTTP; Thu, 30 Aug 2012 01:32:11 -0700 (PDT) Date: Thu, 30 Aug 2012 14:02:11 +0530 Message-ID: Subject: Integrating hadoop with java UI application deployed on tomcat From: Visioner Sadak To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7b603ef2006f2404c87783ac X-Virus-Checked: Checked by ClamAV on apache.org --047d7b603ef2006f2404c87783ac Content-Type: text/plain; charset=ISO-8859-1 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 --047d7b603ef2006f2404c87783ac Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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

--047d7b603ef2006f2404c87783ac--