4

This specific question is related to the missing stacktrace for the NullPointerException raised.

So I have a Clojure file, which gets compiled by my Java web app using the following:

Compiler.loadFile("/tmp/test.clj");
Var cljFunc = RT.var("abc", "foo");
cljFunc.invoke(12);

However, I'm getting a NullPointerException at the line of cljfunc.invoke(12). I'm expecting it to show (in the stacktrace) the line number .clj file that the exception occurred. But the stacktrace is null. I added -XX:-OmitStackTraceInFastThrow in the Tomcat launch command to turn off the JVM optimization. But it did not help.

4

1 回答 1

3

我怀疑cljFunc当你调用invoke它时它是空的。

于 2012-07-24T02:26:54.610 回答