The cause stack is swallowed when exceptions are thrown during initialization of the user namespace. Compiler exceptions thrown after this point have the full stack trace.
The behavior changed between 1.10 alpha6 and alpha7.
Cause: The changes in CLJ-2373 for CompilerException.toString() use calls to RT. In the scenario above, we are in the path of RT static initialization so RT has not yet been loaded. Thus the toString() logic triggers NoClassDefFoundError while building the message in the toString() of the actual exception.
Approach: Stop using RT.get() in the toString() and use IPersistentMap.valAt() directly.
Thanks Daniel – I edited the repro case a bit.
This is due to the Compiler$CompilerException.toString() change in CLJ-2373, looking at it.
-2 fixes some test failures - oops!