One problem with doing this in a static initializer is that you lose the
relevant exception.  I would try moving this to a constructor or lazy-load
it, and you might get a better error message.


On Wed, Jun 5, 2013 at 1:28 PM, Jim - FooBar(); <jimpil1...@gmail.com>wrote:

> Hello everyone,
>
> weirdness strikes again!
>
> I've got the following situation:
>
> - a namespace core.clj which imports a java class, let's call it Foo.java
> - Foo.java requires core.clj in the usual way :
>
>      private static IFn requireFn =   RT.var("clojure.core",
> "require").fn();
>      static { requireFn.invoke(Symbol.**intern("someNamespace.core")); }
>
> Now, the first time I (load-file "xxx.core.clj") everything is perfectly
> fine. The minute I make a change and re-load I get:
>
> NoClassDefFoundError Could not initialize class yyy.Foo
>
> have you ever had that? what do you do when one of your java sources
> delegates back to a namespace of yours? is that completely bad design
> perhaps?
>
> thanks for your time,
>
> Jim
>
> --
> --
> 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+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en>
> --- You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> clojure+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to