3

I've been using RDAVIDWebService for the last few days and suddenly this morning it gives the following error. I'm using R 3.1.1 on a Windows 7 computer although I can switch to a different computer and get the same error. Can anyone tell me what this error means and why it appeared today and not yesterday? Nick

david<-DAVIDWebService$new(email="user@inst")
Error in .jcall(stub, "S", "authenticate", email) : org.apache.axis2.AxisFault: Transport error: 301 Error: Moved Permanently

1 Answer 1

3

Cristóbal Fresno sent out a work-around which follows:

Work around for the new DAVID Web service configuration

1) First of all the HTTPS certificate needs Java 8 in order to run. Previous versions will not run due to prime size. The maximum size that Java accepts is 1024 bits. This is a known issue (see JDK-6521495).

1.1) Check your java version

java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

If the version is 1.7.XX or earlier then you need to install Java 8. If not, go to step 2.

1.2) In windows, download and install jre or jdk 8 from oracle site

1.2) In linux follow the instructions in http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html Briefly, you need to add webupd8team repository and install the package:

su -echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit

2) The actual certificate used by DAVID is not signed by a recognized authority in Java brunch. Then, it must be incorporated to "cacerts" files to properly use it. 2.1) In Windows: Download cygwin and follow linux instructions. Usually for JRE should be installed in C:\Program Files\Java\jre1.8.0_51\lib\security or C:\Program Files\Java\jdk1.8.0_51\jre\lib\security for JDK. Reboot the computer if necessary.

2.2) In Linux: Get the certificate:

echo -n | openssl s_client -connect david.ncifcrf.gov:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ncifcrf.cert

Check if it was properly downloaded:

openssl x509 -in ncifcrf.cert -text

Backup the cacerts file. In my case it is located in /etc/ssl/certs/java directory

sudo cp /etc/ssl/certs/java/cacerts cacerts.org
sudo keytool -import -trustcacerts -keystore cacerts -storepass changeit -noprompt -alias david -file ncifcrf.cert

The certificate should be added to the keystore. Now, copy the new cacerts version to the original position

sudo cp cacerts /etc/ssl/certs/java/

3) Update Java configuration in R

R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 1.8.0_60
Java home path   : /usr/lib/jvm/java-8-oracle/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

4) Finally, use the new DAVID web service URL in RDAVIDWebService

library("RDAVIDWebService")

david<-DAVIDWebService(email="user@email", url="https://david.ncifcrf.gov/webservice/services/DAVIDWebService.DAVIDWebServiceHttpSoap12Endpoint/")
david

#DAVIDWebService object to access DAVID's website. 
#User email:  user@email 
#Available Gene List/s: not submitted yet. 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.