Hi

I have found the cause this morning. The ContextClassLoader on the 
currentthread was null. I managed to work around this by checking for null 
and then setting it as the SystemClassLoader if needed. 

I am using lein 2.5.3, java 1.8.0_65.

The ClassLoader issue only occurs on Mac, but there seem to be no other 
examples of this online which suggest its specific to our setup. We are 
using JavaFX, Clj, Cljs and Java. 

I will continue to explore and see whether when we remove JavaFX dependency 
in the next few months that resolves it. 

For now, I have at least found a workaround.

On Monday, 16 November 2015 23:31:49 UTC, Gary Verhaegen wrote:
>
> I have no idea what this could be. Is there any chance you could build up 
> a minimal-ish project that reproduces this ? I have been using Clojure on a 
> Mac for years without any problem.
>
> Also, at much less effort on your part, could you post the Leiningen and 
> JVM versions ? lein version should print both.
>
> On Monday, 16 November 2015, Phil Segal <phil....@erudine.com 
> <javascript:>> wrote:
>
>> We have been happily using clojure on windows and linux, today we tried 
>> to run on a MacBook Pro and ran into several issues.
>>
>> The current stopper is a CNFE as per the title (stack trace at the end).
>>
>> I have now replicated this on my personal Mac and seen the same 
>> behaviour. I can't find anything that suggests that there is anything 
>> special to do.
>>
>> I installed leiningen using brew, and am using clojure 1.7.0 as a maven 
>> dependency in our java code.
>>
>> The issue is occurring in a java constructor which is then calling:
>>
>> IFn require = Clojure.var("clojure.core", "require");
>>
>> require.invoke(Clojure.read("com.xxx.our-name-space"), RELOAD);
>> aFn = Clojure.var("com.xxx-our-name-space", "a-function");
>>
>>
>> Any assistance would be amazing. 
>>
>> Thanks
>> Phil
>>
>> Caused by: java.lang.NoClassDefFoundError: clojure/lang/AFunction
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
>> at clojure.lang.DynamicClassLoader.defineClass(DynamicClassLoader.java:46)
>> at clojure.lang.Compiler$ObjExpr.getCompiledClass(Compiler.java:4833)
>> at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3993)
>> at clojure.lang.Compiler.analyzeSeq(Compiler.java:6721)
>> ... 32 more
>> Caused by: java.lang.ClassNotFoundException: clojure.lang.AFunction
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>> at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>> at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> ... 39 more
>>
>> -- 
>> 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/d/optout.
>>
>

-- 
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/d/optout.

Reply via email to