Issue with clutch 0.2.5-snapshot.

30 views
Skip to first unread message

Manoj Waikar

unread,
Sep 6, 2011, 9:34:34 AM9/6/11
to clojure...@googlegroups.com
Hi,

If I use clojure 1.2.0 or 1.2.1 with clutch 0.2.5-snapshot, I get the following error when I say (use 'com.ashafa.clutch)

clojure.lang.RT.keyword(Ljava/lang/String;Ljava/lang/String;)Lclojure/lang/Keyword;
  [Thrown class java.lang.NoSuchMethodError]

Restarts:
 0: [QUIT] Quit to the SLIME top level

Backtrace:
  0: clojure.data.json__init.__init0(Unknown Source)
  1: clojure.data.json__init.<clinit>(Unknown Source)
  2: java.lang.Class.forName0(Native Method)
  3: java.lang.Class.forName(Class.java:247)
  4: clojure.lang.RT.loadClassForName(RT.java:1578)
  5: clojure.lang.RT.load(RT.java:399)
  6: clojure.lang.RT.load(RT.java:381)
  7: clojure.core$load$fn__4511.invoke(core.clj:4905)
  8: clojure.core$load.doInvoke(core.clj:4904)
  9: clojure.lang.RestFn.invoke(RestFn.java:409)
 --more--

and if I try to use it with clojure 1.3.0-beta3, I get the following error -

clojure.lang.KeywordLookupSite.<init>(ILclojure/lang/Keyword;)V
  [Thrown class java.lang.NoSuchMethodError]

Restarts:
 0: [QUIT] Quit to the SLIME top level

Backtrace:
  0: clojure.contrib.http.agent$setup_http_connection.<clinit>(agent.clj:81)
  1: clojure.contrib.http.agent__init.load(Unknown Source)
  2: clojure.contrib.http.agent__init.<clinit>(Unknown Source)
  3: java.lang.Class.forName0(Native Method)
  4: java.lang.Class.forName(Class.java:247)
  5: clojure.lang.RT.loadClassForName(RT.java:2030)
  6: clojure.lang.RT.load(RT.java:417)
  7: clojure.lang.RT.load(RT.java:398)
  8: clojure.core$load$fn__4610.invoke(core.clj:5386)
  9: clojure.core$load.doInvoke(core.clj:5385)
 --more--

Please let me know what's the issue. I don't want to use clutch 0.2.4 because it doesn't have view-server-exec-string functionality.

Thanks,
Manoj.

Chas Emerick

unread,
Sep 6, 2011, 10:33:06 AM9/6/11
to clojure...@googlegroups.com
It sounds like you have some AOT-compiled classfiles on your classpath — either from another library, or as a result of your own build.

If the latter, clean the necessary directories. Tracking down the former can be a little tricky, and perhaps won't be necessary.

- Chas

Manoj Waikar

unread,
Sep 6, 2011, 2:51:49 PM9/6/11
to clojure...@googlegroups.com
Thanks Chas. I tried deleting all jar files including the lib and classes directory. But now if I do (use 'com.ashafa.clutchapp) then I get -

Could not initialize class clojure.data.json__init
  [Thrown class java.lang.NoClassDefFoundError]


Restarts:
 0: [QUIT] Quit to the SLIME top level

Backtrace:
  0: java.lang.Class.forName0(Native Method)
  1: java.lang.Class.forName(Class.java:247)
  2: clojure.lang.RT.loadClassForName(RT.java:1578)
  3: clojure.lang.RT.load(RT.java:399)
  4: clojure.lang.RT.load(RT.java:381)
  5: clojure.core$load$fn__4519.invoke(core.clj:4915)
  6: clojure.core$load.doInvoke(core.clj:4914)
  7: clojure.lang.RestFn.invoke(RestFn.java:408)
  8: clojure.core$load_one.invoke(core.clj:4729)
  9: clojure.core$load_lib.doInvoke(core.clj:4766)
 --more--

although data.json-0.1.1.jar is in my lib folder.

Chas Emerick

unread,
Sep 6, 2011, 3:40:52 PM9/6/11
to clojure...@googlegroups.com
Assuming you're using leiningen, you'll need to do `lein deps` again in order to re-copy your dependencies into /lib.

Also, would you mind pasting your project.clj somewhere?

- Chas

Manoj Waikar

unread,
Sep 6, 2011, 10:45:18 PM9/6/11
to clojure...@googlegroups.com
Yes I use leiningen, and I've repeated the process of deleting whole directories, and starting with lein new a couple times. I am attaching my project.clj.
I get one error with clojure 1.2.1 and another one with clojure 1.3.0-beta3.

Thanks for looking into this.
Manoj.
project.clj

Manoj Waikar

unread,
Sep 6, 2011, 11:17:56 PM9/6/11
to clojure...@googlegroups.com
I am sorry for pasting the wrong project.clj, please use this one.
project.clj

Manoj Waikar

unread,
Sep 7, 2011, 11:41:12 PM9/7/11
to clojure...@googlegroups.com
OK, so as per my knowledge, here is the issue - the method clojure.contrib.http.agent/setup-http-connection is marked as private (defn-) so if I manually update it to be public (just defn) I am able to run it in cmd prompt (via lein repl) and via emacs (via lein swank).

Chas Emerick

unread,
Sep 8, 2011, 10:13:19 AM9/8/11
to clojure...@googlegroups.com
Manoj,

I haven't had a chance to dig into replicating your issue, but the change you describe should not impact the error that you reported.

FWIW, the HEAD of clutch master currently tests clean against 1.2.0 and 1.3.0, so your encountering an error loading the code to begin with is confusing to me.

Hopefully I will have a chance to look at this over the weekend.

- Chas

Chas Emerick

unread,
Sep 26, 2011, 10:49:09 PM9/26/11
to Clojure Clutch
Manoj,

It's somewhat late in coming, but I believe I've been able to
replicate your issue — it turns out that the 0.2.5-SNAPSHOT build
erroneously included some AOT-compiled class files built against
Clojure 1.2.0 that precluded that build of Clutch from working with
1.3.0. I have now pushed up a new 0.2.5-SNAPSHOT to clojars that
should resolve your issue.

I apologize for the delay, and for the difficulty to begin with. If
you can verify that the latest 0.2.5-SNAPSHOT works for you (just run
`lein deps`), that would be great. I'd like to release 0.2.5 this
week, but would love to have some validation that the current
corrected SNAPSHOT has resolved this issue.

Thanks,

- Chas
Reply all
Reply to author
Forward
0 new messages