Authentication issues to RDAVIDWebService
4
0
Entering edit mode
alon.goren • 0
@alongoren-8818
Last seen 9.2 years ago
United States

Hi,
I am trying to register to DAVID webservice, but I never got an email to authenticate. Is there something I am missing?
Thanks, 
Alon.

RDAVIDWebService • 5.0k views
ADD COMMENT
1
Entering edit mode
@cristobal-fresno-rodriguez-3838
Last seen 8.5 years ago
Argentina/Cordoba/Universidad Católica …

Greetings,

Thank you for your interest in RDAVIDWebService package. Please follow the instructions below with the update for MAC users.

Please let me know if the problem is solved.

Regards,

Cristóbal Fresno.

 

Work around for the new DAVID Web service configuration V 2.0

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.3) 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

 

1.4) In MAC (tested in Yosemite), there are some things to take into account:

  • Download JDK 8 for MAC from oracle.
  • However, there is a reported bug for Java 8 which searches for JRE 6 installed in your system, in order to work (JDK-7131356).  Ironically, you have to install 1.6 from Apple then Oracle Java 1.8 will start working.
  • Check that your working version is the 1.8

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)

 

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 .

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/

 

2.3) In MAC (tested in Yosemite) the certificate will not work for the present stable openssl version 0.9.8.

 

2.3.1) Check your openssl version

 

openssl version

OpenSSL 0.9.8

 

If it is >= 1.0.2.d then go to step 2.3.3)

 

2.3.2) Update your openssl, i.e., download, compile and install it

Download the official release from OpenSSL >= 1.0.2.d

 

tar -xzvf openssl-1.0.2d.tar.gz

cd openssl-1.0.2d

#Compile it with 64 bits support

./Configure darwin64-x86_64-cc   
make
make test
sudo make install

 

Now you may need to reflect the change in your system if openssl version keeps pointing to the old version.

 

cd /usr/bin
mv sudo openssl openssl098
sudo ln -s /usr/local/ssl/bin/openssl openssl

 

2.3.3)  Get DAVID's certificate and install it into cacerts

Get the certificate:

cd

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 the 1.8.0_60 jdk version is located in /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security/ directory

sudo find / -name cacerts
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/security/cacerts
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security/cacerts
/System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/cacerts
/System/Library/Java/Support/Deploy.bundle/Contents/Home/lib/security/cacerts

 

sudo cp /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security/cacerts .

sudo cp /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security/cacerts cacerts.org
sudo keytool -import -trustcacerts -keystore cacerts -storepass changeit -noprompt -alias david -file ncifcrf.cert
Certificate was added to keystore

 

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

sudo cp cacerts /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security/cacerts

 

3) Update Java configuration in R. The output may slightly change from windows, linux or mac. 

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

 

Please check that both Java version and path are appropriate. In addition JNI support should also be available. 

 

4) Check that rJava R library works as supposed to.

R

library(rJava)

.jinit()

.jcall("java/lang/System", "S", "getProperty", "java.runtime.version")

[1] "1.8.0_20-b26"

 

In Mac the rJava that downloads is tied to 1.6 java version. If it is the case, you should install it from the source.

 

install.packages('rJava', type='source’)

library(rJava)

.jinit()

.jcall("java/lang/System", "S", "getProperty", "java.runtime.version")

[1] "1.8.0_20-b26"

 

5)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. 

0
Entering edit mode
@cristobal-fresno-rodriguez-3838
Last seen 8.5 years ago
Argentina/Cordoba/Universidad Católica …

Hi Alon,

You should register your e-mail here Then, you can use it. I recall that no confirmation e-mail is sent to back to you. If, the email remains unregistered please wait 24-48 hours. If the problem persists. Try to register again.

Regards,

Cristobal

0
Entering edit mode
alon.goren • 0
@alongoren-8818
Last seen 9.2 years ago
United States

Thanks Cristobal. I did try that several times with either my work or personal email, but I still get the error below. Is there something else I am missing?

> david<-DAVIDWebService$new(email="myemail@myisntitute.org")
[INFO] Unable to sendViaPost to url[http://david.abcc.ncifcrf.gov/webservice/services/DAVIDWebService.DAVIDWebServiceHttpSoap12Endpoint/]
org.apache.axis2.AxisFault: Transport error: 301 Error: Moved Permanently
    at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310)
    at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:200)
    at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at sample.session.client.stub.DAVIDWebServiceStub.authenticate(DAVIDWebServiceStub.java:2288)
Error in .jcall(stub, "S", "authenticate", email) : 
  org.apache.axis2.AxisFault: Transport error: 301 Error: Moved Permanently

ADD COMMENT
0
Entering edit mode
alon.goren • 0
@alongoren-8818
Last seen 9.2 years ago
United States

Hi Cristóbal -

Thanks much for the detailed answer and apologies if you have given it before. I did not assume it was the same issue.

ADD COMMENT

Login before adding your answer.

Traffic: 667 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6