Hi, Sindhu.

The problem is in how you've specified the org.apache.hadoop/hadoop-core
dependency (I just ran into this
myself<https://github.com/paxan/ccooo/pull/1>very recently).  It
shouldn't be in the
:dev profile, it should be in the :provided profile.  This should work for
you:

(defproject torunproject "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME";
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[cascalog "1.10.2-SNAPSHOT"]
                 [org.clojure/clojure "1.5.1"][clj-time "0.7.0"]]
  :profiles {:provided
             {:dependencies [[org.apache.hadoop/hadoop-core "1.1.2"]]}}
  :jvm-opts ["-Xmx768m"]
  :repositories [["conjars.org" "http://conjars.org/repo";]]
  :main torunproject.core)

About :provided, the lein
tutorial<https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md>says
the following:

-------

Many Java frameworks expect deployment of a jar file or derived archive
sub-format containing a subset of the application's necessary dependencies.
The framework expects to provide the missing dependencies itself at
run-time. Dependencies which are provided by a framework in this fashion
may be specified in the :provided profile. Such dependencies will be
available during compilation, testing, etc., but won't be included by
default by the uberjar task or plugin tasks intended to produce stable
deployment artifacts.

For example, Hadoop job jars may be just regular (uber)jar files containing
all dependencies except the Hadoop libraries themselves:

(project example.hadoop "0.1.0"
  ...
  :profiles {:provided
             {:dependencies
              [[org.apache.hadoop/hadoop-core "0.20.2-dev"]]}}
  :main example.hadoop)


John




On Thu, May 1, 2014 at 5:54 AM, sindhu hosamane <sindh...@gmail.com> wrote:

> I have a cascalog project which is working perfect in eclipse .
> Now i have single node hadoop cluster up and running .
> To run my cascalog project on hadoop cluster  , i have to create a jar
> using lein uberjar.
> But i have the error and cannot create a jar :
>
> Exception in thread "main" java.lang.ClassNotFoundException:
> org.apache.hadoop.fs.FileSystem, compiling:(core.clj:1:1)
>
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.fs.FileSystem
>
> What could be the reason ? my core.clj(source code)  of project contains (
> defn -main) and also included :main in my project.clj .
>
> For reference i am also attaching my project for which i want to create a
> jar using uberjar . I need a help.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to