Open MageMasher opened 6 years ago
This is similar to https://github.com/clojure-goes-fast/clj-memory-meter/issues/1#issuecomment-373262272, so:
JVM_OPTS=-Djdk.attach.allowAttachSelf=true lein repl
gets to the next step, which is:
CompilerException java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader, compiling:(core.clj:249:3)
user=> *e
#error {
:cause "java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader"
:via
[{:type clojure.lang.Compiler$CompilerException
:message "java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader, compiling:(core.clj:249:3)"
:at [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3700]}
{:type java.lang.ClassCastException
:message "java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader"
:at [portkey.core$fn__17864 invokeStatic "core.clj" 253]}]
:trace
So we need to catch up with changes to classloader hierarchy in Java9.
Then again, Lambda runtime is based on Java8, so it's best to use Java8 for Clojure Lambdas for now.
for future ref: some avoid the flag by launching a helper process https://github.com/raphw/byte-buddy/issues/295
The issue has to do with Ouroboros not being able to instrument the jvm. I tried to highlight the issue but apparently asciinema doesn't display tmux output. Below is the stack trace.