Closed sbtourist closed 13 years ago
Yes, you have to first "lein compile", as there is a Java code inside that needs to be compiled.
Still failing on compile:
Exception in thread "main" java.lang.ClassNotFoundException: ahc.RequestBuilderWrapper (request.clj:15) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:2911) at clojure.lang.Compiler.compile1(Compiler.java:5933) at clojure.lang.Compiler.compile1(Compiler.java:5923) at clojure.lang.Compiler.compile(Compiler.java:5992) at clojure.lang.RT.compile(RT.java:368) at clojure.lang.RT.load(RT.java:407) at clojure.lang.RT.load(RT.java:381) at clojure.core$load$fn4511.invoke(core.clj:4905) at clojure.core$load.doInvoke(core.clj:4904) at clojure.lang.RestFn.invoke(RestFn.java:409) at clojure.core$load_one.invoke(core.clj:4729) at clojure.core$load_lib.doInvoke(core.clj:4766) at clojure.lang.RestFn.applyTo(RestFn.java:143) at clojure.core$apply.invoke(core.clj:542) at clojure.core$load_libs.doInvoke(core.clj:4804) at clojure.lang.RestFn.applyTo(RestFn.java:138) at clojure.core$apply.invoke(core.clj:544) at clojure.core$use.doInvoke(core.clj:4880) at clojure.lang.RestFn.invoke(RestFn.java:422) at http.async.client$loading4410auto.invoke(client.clj:15) at clojure.lang.AFn.applyToHelper(AFn.java:159) at clojure.lang.AFn.applyTo(AFn.java:151) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:2906) at clojure.lang.Compiler.compile1(Compiler.java:5933) at clojure.lang.Compiler.compile1(Compiler.java:5923) at clojure.lang.Compiler.compile(Compiler.java:5992) at clojure.lang.RT.compile(RT.java:368) at clojure.lang.RT.load(RT.java:407) at clojure.lang.RT.load(RT.java:381) at clojure.core$load$fn4511.invoke(core.clj:4905) at clojure.core$load.doInvoke(core.clj:4904) at clojure.lang.RestFn.invoke(RestFn.java:409) at clojure.core$load_one.invoke(core.clj:4729) at clojure.core$compile$fn4516.invoke(core.clj:4916) at clojure.core$compile.invoke(core.clj:4915) at user$eval7.invoke(NO_SOURCE_FILE:1) at clojure.lang.Compiler.eval(Compiler.java:5424) at clojure.lang.Compiler.eval(Compiler.java:5415) at clojure.lang.Compiler.eval(Compiler.java:5391) at clojure.core$eval.invoke(core.clj:2382) at clojure.main$eval_opt.invoke(main.clj:235) at clojure.main$initialize.invoke(main.clj:254) at clojure.main$null_opt.invoke(main.clj:279) at clojure.main$main.doInvoke(main.clj:354) at clojure.lang.RestFn.invoke(RestFn.java:422) at clojure.lang.Var.invoke(Var.java:369) at clojure.lang.AFn.applyToHelper(AFn.java:165) at clojure.lang.Var.applyTo(Var.java:482) at clojure.main.main(main.java:37) Caused by: java.lang.ClassNotFoundException: ahc.RequestBuilderWrapper 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:58) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at http.async.client.request$loading4410auto__.invoke(request.clj:15) at clojure.lang.AFn.applyToHelper(AFn.java:159) at clojure.lang.AFn.applyTo(AFn.java:151) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:2906)
Does that happen when you do "lein compile"
Yes.
When I do $ lein deps && lein compile && lein test I get: Copying 4 files to /Users/neotyk/Source/clojure/http.async.client/lib Overriding previous definition of reference to http.async.client Overriding previous definition of reference to dependency.fileset Copying 43 files to /Users/neotyk/Source/clojure/http.async.client/lib/dev Compiling 1 source file to /Users/neotyk/Source/clojure/http.async.client/classes Compiling http.async.client Reflection warning, http/async/client/test.clj:126 - reference to field close can't be resolved. Reflection warning, http/async/client/test.clj:127 - reference to field stop can't be resolved. Reflection warning, http/async/client/test.clj:260 - call to toString can't be resolved. Reflection warning, http/async/client/test.clj:320 - reference to field close can't be resolved. Reflection warning, http/async/client/test.clj:333 - reference to field getMessage can't be resolved. Reflection warning, http/async/client/test.clj:384 - reference to field close can't be resolved. Reflection warning, http/async/client/test.clj:391 - reference to field close can't be resolved. Reflection warning, http/async/client/test.clj:404 - reference to field getMessage can't be resolved. Reflection warning, http/async/client/test.clj:397 - reference to field close can't be resolved.
Testing http.async.client.test 2010-09-27 14:20:53.147:INFO::jetty-7.1.4.v20100610 2010-09-27 14:20:54.198:INFO::Started SelectChannelConnector@0.0.0.0:8123 auth: nil
FAIL in (basic-authentication) (test.clj:355) expected: (= (:code (status (GET "http://localhost:8123/basic-auth" :auth {:user "beastie", :password "boys"}))) 200) actual:
401
Ran 30 tests containing 88 assertions. 1 failures, 0 errors.
No way, still getting the exception. What leiningen version are you on?
I'm a bit outdated: Leiningen 1.2.0 on Java 1.6.0_20 Java HotSpot(TM) 64-Bit Server VM So I can see the issue already, there is javac plugin that I modified to needs of this project, and introduced hooks, that have been changed seance 1.2.0. Will look into it, and try to make it run with new leiningen.
Ok, should be fixed now. Please pull changes and try "lein deps && lein compile && lein test" One test is failing, but 1. I'm working on it 2. it should allow you to get started.
All test are passing now, can we close this issue?
Now working.
Using latest sources in master, I get the following exception while trying to import client code with "(use '[http.async.client :as http])":
java.lang.ClassNotFoundException: ahc.RequestBuilderWrapper (request.clj:15)