Hi Tassilo,

Did you include your jar name into you classpath on your REPL starting
script?

Stephane

On Mar 15, 11:53 am, Tassilo Horn <[email protected]> wrote:
> Hi,
>
> when I write a lib with this header
>
> --8<---------------cut here---------------start------------->8---
> (ns de.tsdh.math.primes
>   (:use [clojure.contrib [math :only [expt]] [test-is :only [deftest is]]]))
> --8<---------------cut here---------------end--------------->8---
>
> and create a jar file of it which contains the relevant file
>
> --8<---------------cut here---------------start------------->8---
> M Filemode      Length  Date         Time      File
> - ----------  --------  -----------  --------  -----------------------
>   drwxr-xr-x         0  13-Mar-2009  15:44:58  META-INF/
>   -rw-r--r--       117  13-Mar-2009  15:44:56  META-INF/MANIFEST.MF
>   drwxr-xr-x         0  13-Mar-2009  15:35:44  de/
>   drwxr-xr-x         0  13-Mar-2009  15:37:58  de/tsdh/
>   drwxr-xr-x         0  13-Mar-2009  15:44:50  de/tsdh/math/
>   -rw-r--r--      9669  13-Mar-2009  15:33:16  de/tsdh/math/primes.clj
> - ----------  --------  -----------  --------  -----------------------
>                   9786                         6 files
> --8<---------------cut here---------------end--------------->8---
>
> add that jar to the classpath and now do
>
> ,----
> | user> (use 'de.tsdh.math.primes)
> `----
>
> at the REPL, I get this exception:
>
> --8<---------------cut here---------------start------------->8---
> java.lang.Exception: namespace 'de.tsdh.math.primes' not found after loading 
> '/de/tsdh/math/primes' (NO_SOURCE_FILE:0)
>   [Thrown class clojure.lang.Compiler$CompilerException]
>
> Restarts:
>  0: [ABORT] Return to SLIME's top level.
>  1: [CAUSE] Throw cause of this exception
>
> Backtrace:
>   0: clojure.lang.Compiler.eval(Compiler.java:4533)
>   1: clojure.core$eval__3911.invoke(core.clj:1738)
>   2: swank.commands.basic$eval_region__650.invoke(basic.clj:35)
>   3: swank.commands.basic$listener_eval__659.invoke(basic.clj:49)
>   4: clojure.lang.Var.invoke(Var.java:346)
>   5: user$eval__1271.invoke(Unknown Source)
>   6: clojure.lang.Compiler.eval(Compiler.java:4522)
>   7: clojure.core$eval__3911.invoke(core.clj:1738)
>   8: swank.core$eval_in_emacs_package__307.invoke(core.clj:55)
>   9: swank.core$eval_for_emacs__382.invoke(core.clj:123)
>  10: clojure.lang.Var.invoke(Var.java:354)
>  11: clojure.lang.AFn.applyToHelper(AFn.java:179)
>  12: clojure.lang.Var.applyTo(Var.java:463)
>  13: clojure.core$apply__3170.doInvoke(core.clj:408)
>  14: clojure.lang.RestFn.invoke(RestFn.java:428)
>  15: swank.core$eval_from_control__310.invoke(core.clj:62)
>  16: swank.core$eval_loop__313.invoke(core.clj:67)
>  17: swank.core$spawn_repl_thread__441$fn__470$fn__472.invoke(core.clj:168)
>  18: clojure.lang.AFn.applyToHelper(AFn.java:171)
>  19: clojure.lang.AFn.applyTo(AFn.java:164)
>  20: clojure.core$apply__3170.doInvoke(core.clj:408)
>  21: clojure.lang.RestFn.invoke(RestFn.java:428)
>  22: swank.core$spawn_repl_thread__441$fn__470.doInvoke(core.clj:165)
>  23: clojure.lang.RestFn.invoke(RestFn.java:402)
>  24: clojure.lang.AFn.run(AFn.java:37)
>  25: java.lang.Thread.run(Thread.java:619)
> --8<---------------cut here---------------end--------------->8---
>
> When I do the same after evaluating the file manally it works as
> expected.  Why?  Using libs like above does work for the libs in
> clojure-contrib.jar, and I cannot find any differences with the jar for
> my lib...
>
> Bye,
> Tassilo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to