Sorry, that was dumb. Obviously I meant to call with classpath. It works 
fine with standalone. 



On Monday, July 10, 2017 at 1:27:53 AM UTC-4, lawrence...@gmail.com wrote:
>
> I was trying to knock out a quick project today, and most of it was 
> copy-and-paste of another project that I have. This isn't really a big 
> project, despite the long list of dependencies (which I could trim 
> somewhat). 
>
> Anyway, if I run "lein clean" and then "lein uberjar" it seems to compile 
> just fine. 
>
> But then I do this: 
>
>      java -jar target/scan-database-find-similar-items.jar 
>
> and get this: 
>
> Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/Var
> at scan_database_find_similar_items.core.<clinit>(Unknown Source)
> Caused by: java.lang.ClassNotFoundException: clojure.lang.Var
> at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 1 more
>
> What would cause this?
>
> Below is my project.clj file
>
>
> (defproject scan-database-find-similar-items "1.0"
>   :description "scan-database-find-similar-items compares items in the 
> database to other items in the database, in the hopes of finding fake 
> profiles that are duplicates. "
>   :url "https://github.com/jazz/scan-database-find-similar-items";
>   :license {:name "Copyright Sameday.com 2017"
>             :url "http://www.sameday.com/"}
>   :dependencies [
>                  [org.clojure/clojure "1.8.0"]
>                  [org.clojure/test.check "0.9.0"]
>                  [org.clojure/java.jdbc "0.7.0-alpha1"]
>                  [org.clojure/data.json "0.2.5"]
>                  [org.clojure/tools.namespace "0.2.4"]
>                  [org.clojure/core.incubator "0.1.3"]
>                  [org.clojure/core.match "0.3.0-alpha4"]
>                  
>                  [clj-stacktrace "0.2.7"]
>                  [clj-time "0.6.0"]
>                  
>                  [joda-time/joda-time "2.9.4"]
>
>                  [com.taoensso/timbre "4.3.1"]
>                  [defun "0.3.0-RC1"]
>                  [slingshot "0.12.2"]
>                  [manifold "0.1.2"]
>                  [me.raynes/fs "1.4.4"]
>                  [overtone/at-at "1.2.0"]
>                  [mysql/mysql-connector-java "6.0.5"]
>                  [com.novemberain/monger "3.1.0"]
>                  [cheshire "5.3.1"]
>                  
>                  ;; TODO: remove one of these. both are in use
>                  [clj-http "2.3.0"]
>                  [http-kit "2.2.0"]
>                  ]
>
>   :plugins [
>             [lein-localrepo "0.5.3"] ;; install java artifacts locally, 
> even using fake artifactId
>             [lein-cprint "1.0.0"] ;; the same as lein-pprint but with 
> colors
>             [lein-exec "0.3.5"] ;; execute text as Clojure code
>             [lein-nevam "0.1.2"] ;; convert a Maven pom to a project.clj
>             [lein-vanity "0.2.0"] ;; lines of code for vanity's sake
>             [lein-expectations "0.0.8"] ;; run expectations tests
>             [lein-collisions "0.1.4"] ;; find classpath collisions
>             ]
>
>   :aot :all  
>   :source-paths      ["src/clojure"]
>   :java-source-paths ["src/java"]
>   :resource-paths ["src/main/resource"] ; Non-code files included in 
> classpath/jar.
>
>   ;; Name of the jar file produced. Will be placed inside :target-path.
>   ;; Including %s will splice the project version into the filename.
>   :jar-name "scan-database-find-similar-items.jar"
>   ;; As above, but for uberjar.
>   :uberjar-name "scan-database-find-similar-items-standalone.jar"
>   
>   ;; What to do in the case of version issues. Defaults to :ranges, which
>   ;; warns when version ranges are present anywhere in the dependency tree,
>   ;; but can be set to true to warn for both ranges and overrides, or 
> :abort
>   ;; to exit in the case of ranges or overrides.
>   ;;  :pedantic? :abort
>   
>
>   :disable-implicit-clean true
>   :warn-on-reflection true
>   :main scan-database-find-similar-items.core
>   :jvm-opts ["-Xms100m" "-Xmx1000m" "-XX:-UseCompressedOops"])
>
>
>
>

-- 
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