1

我正在尝试使用 org.renjin 包从 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)

请帮帮我,在此先感谢。

4

1 回答 1

1

看起来 Renjin 工具链在将 jsonlite 的 C 代码编译为 Java 类方面并不成功。

作为替代方案,您可以使用rjson存在 Renjin 兼容实现的包: http ://packages.renjin.org/package/org.renjin.cran/rjson

于 2019-09-17T12:59:52.167 回答