I am using clojure in apache karaf which has Thread context class loader 
set to karaf jars.

I changed use-context-classloader to false in RT.java:

final static public Var USE_CONTEXT_CLASSLOADER =
Var.intern(CLOJURE_NS, Symbol.intern("*use-context-classloader*"), 
F).setDynamic();

For some reason booleanCast(USE_CONTEXT_CLASSLOADER.deref()) doesn't always 
return false  and RT still managed to create DynamicClassloader with thread 
context 
classloader as parent.  Of course,   it wasn't able to find any clojure 
classes.

To make it work I commented out this line in baseLoader() method.

else if (booleanCast(USE_CONTEXT_CLASSLOADER.deref())) {
            return Thread.currentThread().getContextClassLoader();
}

Why booleanCast(USE_CONTEXT_CLASSLOADER.deref()) doesn't always return 
false ? 

-- 
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

Reply via email to