r - Error executing library in Rserve from Java -


when start rserve rstudio , try connect rserve using rsclient in code below:

#loading libraries library(rserve) library(rsclient)  #loading rserve rserve(args='--no-save --slave')  #open connection rserve , executing opennpl conn <- rs.connect(port=6311) rs.eval(conn,library(opennlp)) 

all works ok.

but if try start rserve command line (simulating java does). code:

#loading rserve command line, simulate java does. #using mac os 10.10.2 /library/frameworks/r.framework/resources/bin/r cmd /library/frameworks/r.framework/versions/3.2/resources/library/rserve/libs//rserve --no-save --slave --rs-port 6311  #in rstudio #loading rclient library(rsclient)  #loading rserve rserve(args='--no-save --slave')  #open connection rserve , executing opennpl conn <- rs.connect(port=6311) rs.eval(conn,library(opennlp)) 

i error in rstudio:

rsc_abort: connection closed peer error in rs.eval(conn, library(opennlp)) :    read error - not obtain response header 

and error in command line:

  invalid memory access of location 0x110 rip=0x7fff8ea0d5d2 

here , here similar problems reference. original problem rjdbc, not opennlp, , seems both has rjava in common. used opennlp here because it's easy simulate, no need database connection. clue on how solve this?

make sure set same parameters r cmd. make sure check whether rstudio uses same java version.

as memory settings, can use trick

export _java_options="-xmx=2g" 

to set memory size available jvm. using _java_options can enforce settings used jvm.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -