Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rserve connection fails

Tags:

java

r

rserve

wps

I am using WPS4R provided by 52north

Up to 3 days ago everything was fine and WPS could connect to R by use of Rserve properly but now this connection can not be made. I uninstalled everything, including Apache Tomcat,R and Java JDK, and then installed everything again. the problem still exists. This is the error that I get when I send the request. I am sure the code I used is correct, because it used to work and I did not chang any thing .

This is the error:

 An R Connection Error occoured:
    class org.rosuda.REngine.Rserve.RserveException - eval failed,
    request status: error code: 127 null
like image 913
Mona Eshraghi Avatar asked Dec 23 '12 13:12

Mona Eshraghi


1 Answers

The 127 is a parse error that is coming from R, this is not a workspace issue. If you want to get the error message back. Wrap the call to execute your script/r command with the following to get the error message. I have used this in the past and it works well. See the FAQ for more information.

http://www.rforge.net/Rserve/faq.html

  c.assign(".tmp.", myCode);
    REXP r = c.parseAndEval("try(eval(parse(text=.tmp.)),silent=TRUE)");
    if (r.inherits("try-error")) System.err.println("Error: "+r.toString())
    else { // success .. }
like image 106
Chris Hinshaw Avatar answered Nov 16 '22 10:11

Chris Hinshaw