我正在尝试使用org.renjin Package从Java运行以下代码。

library('org.renjin.cran:jsonlite')
data <- stream_in(file("src/main/resources/Events.json"))
print(data$timestamp)


我收到以下错误,

org.renjin.eval.EvalException: Exception calling R_parse : Unsupported pointer store to a memory region allocated for primitives.
This means something went wrong during compilation and we allocated the wrong type of storage.
    at org.renjin.primitives.Native.redotCall(Native.java:378)
    at org.renjin.primitives.R$primitive$$Call.applyPromised(R$primitive$$Call.java:65)
    at org.renjin.sexp.BuiltinFunction.apply(BuiltinFunction.java:100)
    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
    at org.renjin.eval.Context.evaluate(Context.java:282)
    at org.renjin.primitives.special.BeginFunction.apply(BeginFunction.java:39)
    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
    at org.renjin.sexp.Closure.applyPromised(Closure.java:200)
    at org.renjin.sexp.Closure.apply(Closure.java:133)
    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
    at org.renjin.eval.Context.evaluate(Context.java:282)
    at org.renjin.primitives.special.BeginFunction.apply(BeginFunction.java:39)
    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
    at org.renjin.eval.Context.evaluate(Context.java:282)
    at org.renjin.primitives.special.IfFunction.apply(IfFunction.java:44)
    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
    at org.renjin.eval.Context.evaluate(Context.java:282)
    at org.renjin.primitives.special.BeginFunction.apply(BeginFunction.java:39)
    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
    at org.renjin.sexp.Closure.applyPromised(Closure.java:200)
    at org.renjin.sexp.Closure.apply(Closure.java:133)
    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)
    at org.renjin.eval.Context.evaluate(Context.java:282)
    at org.renjin.primitives.Evaluation.lapply(Evaluation.java:94)
    at org.renjin.primitives.R$primitive$lapply.doApply(R$primitive$lapply.java:65)
    at org.renjin.primitives.R$primitive$lapply.applyPromised(R$primitive$lapply.java:30)
    at org.renjin.sexp.BuiltinFunction.apply(BuiltinFunction.java:100)
    at org.renjin.primitives.special.InternalFunction.apply(InternalFunction.java:46)


请帮帮我,谢谢。

最佳答案

看起来Renjin工具链未能成功将jsonlite的C代码编译为Java类。

或者,您可以使用rjson包,对于该包,存在与Renjin兼容的实现:
http://packages.renjin.org/package/org.renjin.cran/rjson

10-05 19:42