开发者

JVM crashes after one successful request when using JRI

开发者 https://www.devze.com 2023-03-21 03:31 出处:网络
I am using the JRI api to use \"R\" in Java. I have created a web-service which has the JRI code . When I consume this web-service for the first time it works properly, but with a subsequent request t

I am using the JRI api to use "R" in Java. I have created a web-service which has the JRI code . When I consume this web-service for the first time it works properly, but with a subsequent request the JVM crashes and says : "The crash happened outside the Java Virtual Machine in native code."

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (0xc0000029), pid=9148, tid=9716
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode windows-x86 )
# Problematic frame:
# C  [ntdll.dll+0x8e1b9]
#
# An error report file with more information is saved as:
# C:\Users\ambarish\.netbeans\dev\config\GF3\domain1\hs_err_pid9148.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
开发者_如何转开发

Is this somehow connected to the fact that R has no threading support, you can run only one instance of R within a multi-threaded application?

I am using Rengine to run R scripts in Java, I tried to stop/destroy the Rengine object but it did not work. How can I make sure that Rengine instance is garbage-collected before the second request.

Please let me know how can I solve this issue.


One can only create a single instance of Rengine using JRI. So use Rserve instead, which supports threading.

0

精彩评论

暂无评论...
验证码 换一张
取 消