Openj9 not running clojure?

Followed the installation instructions for openj9 jdk11 here. I expected clj to just work, like it does with oracle jdk 11, 16, and openjdk11. Turns out, clojure won’t start on it. This is surprising to me

I’m running Clojure CLI version 1.10.3.822

Are there any special openj9 java options I need to set?

And does anyone else have this issue?

Different errors I get on starting clj or trying to jack in.

Syntax error macroexpanding clojure.core/defn- at (clojure/tools/cli.cljc:132:1).
null

Full report at:
/tmp/clojure-8219127273539252125.edn

and

Exception in thread "main" java.lang.NullPointerException
        at clojure.core$reduce1.invokeStatic(core.clj:944)
        at clojure.core$set.invokeStatic(core.clj:4101)
        at clojure.core$supers.invokeStatic(core.clj:5542)
        at clojure.core$isa_QMARK_.invokeStatic(core.clj:5566)
        at clojure.core$isa_QMARK_.invoke(core.clj:5553)
        at clojure.lang.Var.invoke(Var.java:393)
        at clojure.lang.MultiFn.isA(MultiFn.java:123)
        at clojure.lang.MultiFn.findAndCacheBestMethod(MultiFn.java:173)
        at clojure.lang.MultiFn.getMethod(MultiFn.java:150)
        at clojure.lang.MultiFn.getFn(MultiFn.java:154)
        at clojure.lang.MultiFn.invoke(MultiFn.java:229)
        at clojure.pprint$write_out.invokeStatic(pprint_base.clj:194)
        at clojure.pprint$pprint_map$fn__11054$fn__11056.invoke(dispatch.clj:113)
        at clojure.pprint$pprint_map$fn__11054.invoke(dispatch.clj:113)
        at clojure.pprint$pprint_map.invokeStatic(dispatch.clj:112)
        at clojure.pprint$pprint_map.invoke(dispatch.clj:106)
        at clojure.lang.MultiFn.invoke(MultiFn.java:229)
        at clojure.pprint$write_out.invokeStatic(pprint_base.clj:194)
        at clojure.pprint$pprint_map$fn__11054$fn__11056.invoke(dispatch.clj:113)
        at clojure.pprint$pprint_map$fn__11054.invoke(dispatch.clj:113)
        at clojure.pprint$pprint_map.invokeStatic(dispatch.clj:112)
        at clojure.pprint$pprint_map.invoke(dispatch.clj:106)
        at clojure.lang.MultiFn.invoke(MultiFn.java:229)
        at clojure.pprint$write_out.invokeStatic(pprint_base.clj:194)
        at clojure.pprint$pprint$fn__10295.invoke(pprint_base.clj:249)
        at clojure.pprint$pprint.invokeStatic(pprint_base.clj:248)
        at clojure.pprint$pprint.invoke(pprint_base.clj:241)
        at clojure.pprint$pprint.invokeStatic(pprint_base.clj:245)
        at clojure.pprint$pprint.invoke(pprint_base.clj:241)
        at clojure.lang.Var.invoke(Var.java:384)
        at clojure.main$report_error$fn__9184$fn__9185.invoke(main.clj:603)
        at clojure.main$report_error$fn__9184.invoke(main.clj:602)
        at clojure.main$report_error.invokeStatic(main.clj:601)
        at clojure.main$main.invokeStatic(main.clj:666)
        at clojure.main$main.doInvoke(main.clj:616)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:705)
        at clojure.main.main(main.java:40)

and

Exception in thread "main" 
java.lang.ExceptionInInitializerError
        at java.base/java.lang.J9VMInternals.ensureError(J9VMInternals.java:185)

        at java.base/java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:174)

        at java.base/java.lang.Class.forNameImpl(Native Method)

        at java.base/java.lang.Class.forName(Class.java:413)

        at clojure.lang.RT.classForName(RT.java:2212)

        at clojure.lang.RT.classForName(RT.java:2221)

        at clojure.lang.RT.loadClassForName(RT.java:2240)

        at clojure.lang.RT.load(RT.java:449)

        at clojure.lang.RT.load(RT.java:424)

        at clojure.core$load$fn__6856.invoke(core.clj:6115)

        at clojure.core$load.invokeStatic(core.clj:6114)

        at clojure.core$load.doInvoke(core.clj:6098)

        at clojure.lang.RestFn.invoke(RestFn.java:408)

        at clojure.core$load_one.invokeStatic(core.clj:5897)

        at clojure.core$load_one.invoke(core.clj:5892)

        at clojure.core$load_lib$fn__6796.invoke(core.clj:5937)

        at clojure.core$load_lib.invokeStatic(core.clj:5936)

        at clojure.core$load_lib.doInvoke(core.clj:5917)

        at clojure.lang.RestFn.applyTo(RestFn.java:142)

        at clojure.core$apply.invokeStatic(core.clj:669)

        at clojure.core$load_libs.invokeStatic(core.clj:5974)

        at clojure.core$load_libs.doInvoke(core.clj:5958)

        at clojure.lang.RestFn.applyTo(RestFn.java:137)

        at clojure.core$apply.invokeStatic(core.clj:669)

        at clojure.core$require.invokeStatic(core.clj:5996)

        at clojure.core$require.doInvoke(core.clj:5996)

        at clojure.lang.RestFn.applyTo(RestFn.java:137)

        at clojure.core$apply.invokeStatic(core.clj:667)

        at clojure.core$serialized_require.invokeStatic(core.clj:6068)

        at clojure.core$requiring_resolve.invokeStatic(core.clj:6077)

        at clojure.main$report_error$fn__9184$fn__9185.invoke(main.clj:602)

        at clojure.main$report_error$fn__9184.invoke(main.clj:602)

        at clojure.main$report_error.invokeStatic(main.clj:601)

        at clojure.main$main.invokeStatic(main.clj:666)

        at clojure.main$main.doInvoke(main.clj:616)

        at clojure.lang.RestFn.applyTo(RestFn.java:137)

        at clojure.lang.Var.applyTo(Var.java:705)

        at clojure.main.main(main.java:40)

Caused by: 
java.lang.NullPointerException
        at clojure.core$refer.invokeStatic(core.clj:4234)

        at clojure.core$refer.doInvoke(core.clj:4205)

        at clojure.lang.RestFn.applyTo(RestFn.java:139)

        at clojure.core$apply.invokeStatic(core.clj:669)

        at clojure.core$load_lib.invokeStatic(core.clj:5955)

        at clojure.core$load_lib.doInvoke(core.clj:5917)

        at clojure.lang.RestFn.applyTo(RestFn.java:142)

        at clojure.core$apply.invokeStatic(core.clj:669)

        at clojure.core$load_libs.invokeStatic(core.clj:5974)
        at clojure.core$load_libs.doInvoke(core.clj:5958)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:671)
        at clojure.core$use.invokeStatic(core.clj:6082)
        at clojure.pprint$loading__6737__auto____9921.invoke(pprint.clj:14)
        at clojure.pprint__init.load(Unknown Source)
        at clojure.pprint__init.<clinit>(Unknown Source)

        ... 36 more

This is a known issue yes. See more info here

https://ask.clojure.org/index.php/10184/clojure-throws-various-exceptions-immediately-adoptopenjdk

Nice. Seems like there is a bugfix in the 0.26.0 version of Openj9, scheduled for release in late April. https://github.com/eclipse/openj9/issues/12191

I tried with the nightly build, I get clojure up and running with that!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.