I also had the same issue some time ago and it was caused by incorrect
using of dash ('-') vs. underscore ('_') in project/namespace name... I
don't remember what concretely was wrong, but you at least can try all
possibilities....
Also, are you using gen-class ?
Marek.
On Wednesday, November 14, 2012 1:11:58 AM UTC+1, Alec Ramsay wrote:
>
> When I do "lein run" now, I get "Exception in thread "main"
> java.lang.ClassNotFoundException:".
>
> I'm early in the process of getting a Clojure development environment set
> up--I coded a lot of LISP years ago and want to dust off my skills with
> Clojure--and I have previously successfully done the following on Mac OS X
> 10.7.5:
>
> - Installed Leiningen using Brew--this installed a V1 version
> - Created and run projects ("lein new"; "lein run"; etc.)
> - Everything worked great
>
> However, I wanted to use nREPL in Aquamacs, so I needed lein 2.x. The only
> way I could get lein2 installed was using these
> steps<http://mikeebert.tumblr.com/post/30368615037/upgrading-to-leiningen-2>.
> After completing them, I successfully tested nREPL inside Aquamacs. Again
> things seemed to work great.
>
> But while "lein new" still works, "lein run" does not. I get the following
> exception:
>
> Exception in thread "main" java.lang.ClassNotFoundException:
> http_hello3.core
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> at clojure.lang.RT.classForName(RT.java:2039)
> at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:199)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
> at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207)
> at user$eval12.invoke(NO_SOURCE_FILE:1)
> at clojure.lang.Compiler.eval(Compiler.java:6511)
> at clojure.lang.Compiler.eval(Compiler.java:6501)
> at clojure.lang.Compiler.eval(Compiler.java:6477)
> at clojure.core$eval.invoke(core.clj:2797)
> at clojure.main$eval_opt.invoke(main.clj:297)
> at clojure.main$initialize.invoke(main.clj:316)
> at clojure.main$null_opt.invoke(main.clj:349)
> at clojure.main$main.doInvoke(main.clj:427)
> at clojure.lang.RestFn.invoke(RestFn.java:421)
> at clojure.lang.Var.invoke(Var.java:419)
> at clojure.lang.AFn.applyToHelper(AFn.java:163)
> at clojure.lang.Var.applyTo(Var.java:532)
> at clojure.main.main(main.java:37)
>
> My project.clj looks like this:
>
> (defproject http_hello3 "0.1.0-SNAPSHOT"
> :description "http hello"
> ; :url "http://example.com/FIXME"
> ; :license {:name "Eclipse Public License"
> ; :url "http://www.eclipse.org/legal/epl-v10.html"}
> :dependencies [[org.clojure/clojure "1.4.0"]])
>
> I've done a lot of searching and tried several different things, to no
> avail. I'd appreciate any pointers you can give me. Thanks ...
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en