I started using one-jar to package my clojure code as a single executable jar and ran into a problem right away with loading of classes. I have a very simple project at g...@github.com:fgx3prak/ bug.git that crashes in the same manner as my real code base and think that the underlying problem is the same.
The source looks like this: (use 'clojure.http.client) (ns bug (:use clojure.http.client)) In short, mvn compile works fine the first time but fails after that. If I have only one of "use" or "ns", there is no error. I believe that the combination of "use" and "ns" represents the condition under which the bug manifests itself in the real code. I haven't been able to figure out the cause of this problem. I have already looked at verbose:class output and AFAIK clojure.http.client class is getting loaded completely. Is there any way to get a trace of clojure class loading? Any help/hints greatly appreciated! Thanks! Exception in thread "main" java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at clojure.lang.RT.loadClassForName(RT.java:1578) at clojure.lang.RT.load(RT.java:399) at clojure.lang.RT.load(RT.java:381) at clojure.core$load$fn__4506.invoke(core.clj:4893) at clojure.core$load.doInvoke(core.clj:4892) at clojure.lang.RestFn.invoke(RestFn.java:409) at clojure.core$load_one.invoke(core.clj:4717) at clojure.core$compile$fn__4511.invoke(core.clj:4904) at clojure.core$compile.invoke(core.clj:4903) at clojure.lang.Var.invoke(Var.java:365) at clojure.lang.Compile.main(Compile.java:56) Caused by: java.lang.NullPointerException at clojure.core$refer.doInvoke(core.clj:3276) at clojure.lang.RestFn.invoke(RestFn.java:411) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.RestFn.applyTo(RestFn.java:133) at clojure.core$apply.invoke(core.clj:542) at clojure.core$load_lib.doInvoke(core.clj:4769) at clojure.lang.RestFn.applyTo(RestFn.java:143) at clojure.core$apply.invoke(core.clj:542) at clojure.core$load_libs.doInvoke(core.clj:4788) at clojure.lang.RestFn.applyTo(RestFn.java:138) at clojure.core$apply.invoke(core.clj:544) at clojure.core$use.doInvoke(core.clj:4868) at clojure.lang.RestFn.invoke(RestFn.java:409) at bug__init.load(Unknown Source) at bug__init.<clinit>(Unknown Source) ... 13 more -- 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