Is clojure-contrib 1.1.0 supported?

Does La Clojure support clojure-contrib version 1.1.0? When running a script it gives the exception below.  The script consists of just:

(ns my-space
  (:require clojure.contrib.str-utils2))

If the :require form is removed then the exception goes away.

Versions:
IntelliJ Community Edition 9.0.2
La Clojure plugin 0.2.267
JDK 1.6.0_17

On the Dependencies tab  of the Module settings I have clojure-1.1.0.jar and clojure-contrib.jar (version 1.1.0).

Could ..\clojure-plugin\lib\clojure.jar at the beginning of the classpath be the reason? Its size is different than the 1.1 clojure.jar so presumably it's not the same version? Is there a way to remove it from the classpath?

Thanks in advance.


"C:\Program Files\Java\jdk1.6.0_17\bin\java" -Didea.launcher.port=7537 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 9.0.2\bin" -Dfile.encoding=windows-1252 -classpath "C:\Users\Myself\.IntelliJIdea90\config\plugins\clojure-plugin\lib\clojure.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\alt-rt.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\ext\sunjce_provider.jar;C:\Users\Myself\Documents\Temp\TestClojure1\out\production\TestClojure1;C:\Users\Myself\Documents\Temp\TestClojure1\lib\clojure.jar;C:\Users\Myself\Documents\Temp\TestClojure1\BoulderCat_Game\BoulderCat.jar;C:\Users\Myself\Documents\Temp\TestClojure1\lib\clojure-contrib.jar;C:/Users/Myself/Documents/Temp/TestClojure1/src;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 9.0.2\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain clojure.main C:\Users\Myself\Documents\Temp\TestClojure1\src\Test2.clj


Exception in thread "main" java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V (Test2.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5341)
at clojure.lang.Compiler.eval(Compiler.java:5317)
at clojure.lang.Compiler.load(Compiler.java:5736)
at clojure.lang.Compiler.loadFile(Compiler.java:5699)
at clojure.main$load_script__6268.invoke(main.clj:213)
at clojure.main$script_opt__6296.invoke(main.clj:265)
at clojure.main$main__6314.doInvoke(main.clj:346)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.lang.Var.invoke(Var.java:365)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
Caused by: java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V
at clojure.contrib.str_utils2$dochars__7618.<init>(str_utils2.clj:37)
at clojure.contrib.str_utils2__init.load(Unknown Source)
at clojure.contrib.str_utils2__init.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at clojure.lang.RT.loadClassForName(RT.java:1550)
at clojure.lang.RT.load(RT.java:379)
at clojure.lang.RT.load(RT.java:361)
at clojure.core$load__5136$fn__5143.invoke(core.clj:4338)
at clojure.core$load__5136.doInvoke(core.clj:4337)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.core$load_one__5077.invoke(core.clj:4166)
at clojure.core$load_lib__5092.doInvoke(core.clj:4203)
at clojure.lang.RestFn.applyTo(RestFn.java:143)
at clojure.core$apply__3661.invoke(core.clj:480)
at clojure.core$load_libs__5108.doInvoke(core.clj:4237)
at clojure.lang.RestFn.applyTo(RestFn.java:138)
at clojure.core$apply__3661.invoke(core.clj:480)
at clojure.core$require__5130.doInvoke(core.clj:4305)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at my_space$eval__3$loading__5025__auto____4.invoke(Test2.clj:1)
at my_space$eval__3.invoke(Test2.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5325)
... 16 more

Process finished with exit code 1

0
Avatar
Permanently deleted user

I found a solution for this. By default La Clojure includes ...\clojure-plugin\lib\clojure.jar at the beginning of the classpath.  Setting -classpath in the "VM Parameters" in the run configuration can override this so that a different version of clojure can be used.

0

请先登录再写评论。