[OTDev] Fwd: SW Development process...SL update

surajit ray mr.surajit.ray at gmail.com
Thu Dec 24 15:57:58 CET 2009


Hi

I tried to install Rserve - it installed fine from within R

However when I tried the client form this link :
http://rosuda.org/Rserve/down.shtml
I got this error :
################## Error Message Start ##########################
Dec 24, 2009 8:15:20 PM javaapplication1.Main main
SEVERE: null
org.rosuda.JRclient.RSrvException: Handshake failed: The server uses more
recent protocol than this client.
        at org.rosuda.JRclient.Rconnection.<init>(Rconnection.java:113)
        at org.rosuda.JRclient.Rconnection.<init>(Rconnection.java:58)
        at org.rosuda.JRclient.Rconnection.<init>(Rconnection.java:42)
        at javaapplication1.Main.main(Main.java:27)
################## Error Message End ##########################


Looks like a issue of versions here. The worst part is that the link for the
latest build for the client is down (http://www.rosuda.org/R/nightly)

 I had installed Rserve from within R using install.packages("Rserve"). So I
do not really know how to install an older version of Rserve.

The other method of using JRI is not working now. When I
try install.packages("rJava") I get an error like this :
################## Error Message Start ##########################
checking JNI data types... configure: error: One or more JNI types differ
from the corresponding native type. You may need to use non-standard
compiler flags or a different compiler in order to fix this.
ERROR: configuration failed for package ‘rJava’
* Removing ‘/home/surajit/R/x86_64-pc-linux-gnu-library/2.9/rJava’
################## Error Message END ##########################

I* am using ubuntu 9.10 with java-6-sun.* All my JAVA related variables are
set. I have also tried

sudo R CMD javareconf

and it went through the motions alright - but rJava still does not install !

Could you please give me some pointers as to how to make this work with R.

Thanks in advance

Cheers
Surajit Ray

On Tue, Dec 22, 2009 at 9:26 PM, Rajarshi Guha <rajarshi.guha at gmail.com>wrote:

> When I implemented a R-based stats web service infrastructure (
> http://dx.doi.org/10.1021/ci700188u and
> http://www.chembiogrid.org/projects/proj_statistics.html) my approach was
> to
> have an Rserve instance running somewhere (in our case it was on a remote
> machine that stored our pre-built models). The web based application
> (originally Axis based SOAP but I think IU has now provided more RESTful
> wrappers or implementations) would then send queries to the Rserve
> instance.
>
> As a result of this, we only needed a single Rserve instance running
> independent of the frontend (which was a web page but could have been
> anything), rather than multiple instances being started up. You can see the
> code for this at
> http://cicc-grid.svn.sourceforge.net/viewvc/cicc-grid/cicc-grid/rws/trunk/
>
> More recently, in support of the Open Notebook Solubility Challenge, I
> looked at an alternative approach based on mod_python based web
> applications. In this case, I used the rpy2 Python package to interface to
> R, to load models and get solubility predictions. A very nice API, and
> somewhat simpler than my original Rserve based solution, but it does imply
> that each time the app is run, an R instance is reloaded (I'm not sure that
> I could share instances between sessions). See
> http://github.com/rajarshi/rest-ws/tree/master/predict/ for code
>
> One other approach, that I haven't explored yet is the use of rapache,
> which
> is a DSO for Apache that runs R. In this approach, you'd avoid the start up
> cost of R instances, since they'd already be running.Furthermore, you could
> easily serve up pages directly from R code.
>
> On Tue, Dec 22, 2009 at 9:35 AM, surajit ray <mr.surajit.ray at gmail.com
> >wrote:
>
> > I am using JRI with the situation that the Java code (for prediction ) is
> a
> > desktop aplication which is being initiated by the ./run script in rJava
> > (within the JRI subfolder). This means that the R engine is being started
> > by
> > the script and then the java code is initiated.
> >
> > This is ok in working for the desktop application. But since we are going
> > to
> > develop an online service - I have to reprogram the code in JSP etc.
> > However
> > this means I cannot use the JRI run script (since the code has to be
> > initiated by tomcat).
> >
> > So I would like to start the engine from within the Java Code (JSP). I
> have
> > tried this - but this is not recommended by the author of JRI. My
> attempts
> > have failed till now. I can forward the exact code and the details of the
> > errors.
> >
> > Cheers
> > Surajit
> >
> > On Tue, Dec 22, 2009 at 2:12 PM, Rajarshi Guha <rajarshi.guha at gmail.com
> > >wrote:
> >
> > >
> > > On Dec 22, 2009, at 4:32 AM, Egon Willighagen wrote:
> > >
> > >
> > > >>> 5) Unable to make the R part of the code native to java as yet.
> > > >>> Still
> > > >>> trying a few things. This hinders our ability to provide the API
> > > >>> interface.
> > > >>>
> > > >> I am aware of at least one Java - R integration, namely The CDK
> > > >> library
> > > >> (*http://cdk*.*sourceforge*.*net*/)  has R integration since few
> > > >> years -
> > > >> it might help if you consult the code there. And AFAIK the author of
> > > >> CDK-R code is on this list as well, so please do ask specific
> > > >> questions
> > > >> on the development mailing list.
> > > >
> > > > Not sure if Rajarshi is on the list yet, but he indeed wrote various
> > > > levels of integration, calling R from a Java environment is one.
> > > >
> > > > Have a look at http://www.omegahat.org/RSJava/, which has a section
> on
> > > > 'Calling R from Java'.
> > >
> > > I'm here :)
> > >
> > > Indeed, RSJava is one way to make calls to R from Java. However, the
> > > preferred solution is to us JRI (which is what the CDK-R bridge uses)
> > > which has a much more robust interface
> > >
> > > ----------------------------------------------------
> > > Rajarshi Guha        | NIH Chemical Genomics Center
> > > http://www.rguha.net | http://ncgc.nih.gov
> > > ----------------------------------------------------
> > > A committee is a group that keeps the minutes and loses hours.
> > >        -- Milton Berle
> > >
> > >
> > > _______________________________________________
> > > Development mailing list
> > > Development at opentox.org
> > > http://www.opentox.org/mailman/listinfo/development
> > >
> >
> >
> >
> > --
> > Surajit Ray
> > _______________________________________________
> > Development mailing list
> > Development at opentox.org
> > http://www.opentox.org/mailman/listinfo/development
> >
>
>
>
> --
> Rajarshi Guha
> NIH Chemical Genomics Center
> _______________________________________________
> Development mailing list
> Development at opentox.org
> http://www.opentox.org/mailman/listinfo/development
>



-- 
Surajit Ray
Partner
www.rareindianart.com



More information about the Development mailing list