You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to load an application that has some of its parts written in Clojure. Trying to load the Clojure runtime, I get the following error. It seems that that Clojure is internally using Class.forName to load some stuff and that is resulting in the following exception when it internally attempts to use Unsafe.
I would have assumed that because this is running entirely compiled to webassembly, it should be possible for it to use unsafe internally.
java.lang.SecurityException: Unsafejava.lang.SecurityException: Unsafe
at sun.misc.Unsafe.getUnsafe(Unknown Source)
at java.net.InetAddress(Unknown Source)
at internal.internal(Unknown Source)
at internal.internal(Unknown Source)
at java.lang.Class.forName0(Unknown Source)
at clojure.lang.RT.classForName(Unknown Source)
at clojure.core.server$loading__6789__auto____8961.invoke(Unknown Source)
at clojure.core.server__init.load(Unknown Source)
at clojure.core.server__init(Unknown Source)
at internal.internal(Unknown Source)
at internal.internal(Unknown Source)
at java.lang.Class.forName0(Unknown Source)
at clojure.lang.RT.classForName(Unknown Source)
at clojure.lang.RT.loadClassForName(Unknown Source)
at clojure.lang.RT.load(Unknown Source)
at clojure.core$load$fn__6908.invoke(Unknown Source)
at clojure.core$load.invokeStatic(Unknown Source)
at clojure.core$load.doInvoke(Unknown Source)
at clojure.core$load_one.invokeStatic(Unknown Source)
at clojure.core$load_lib$fn__6850.invoke(Unknown Source)
at clojure.core$load_lib.invokeStatic(Unknown Source)
at clojure.core$load_lib.doInvoke(Unknown Source)
at clojure.core$load_libs.invokeStatic(Unknown Source)
at clojure.core$load_libs.doInvoke(Unknown Source)
at clojure.lang.RT.doInit(Unknown Source)
The text was updated successfully, but these errors were encountered:
This is likely to be caused by the incomplete support for class loaders in CheerpJ 2.x. This whole class of problems will be solved with the new CheerpJ 3.x architecture that is currently under development.
Please provide a self-contained JAR that demonstrate the problem, so that we can use it as a test case.
@alexp-sssup I have created a simple self-contained jar that launches clojure and causes this issue.
I also included a demo page that generates the stack trace.
I am trying to load an application that has some of its parts written in Clojure. Trying to load the Clojure runtime, I get the following error. It seems that that Clojure is internally using
Class.forName
to load some stuff and that is resulting in the following exception when it internally attempts to use Unsafe.I would have assumed that because this is running entirely compiled to webassembly, it should be possible for it to use unsafe internally.
The text was updated successfully, but these errors were encountered: