Question: DAVIDWebService$new(): Error: .jinit(...) == 0 is not TRUE
0
gravatar for Aditya
4.5 years ago by
Aditya120
Germany
Aditya120 wrote:

I tried to use RDAVIDWebService (I did fill in a proper registered email address ):

require(RDAVIDWebService)
david <- DAVIDWebService$new(email = 'myemailaddress')

 

But that gave me the following error:

Error: .jinit(...) == 0 is not TRUE

 

I am using R 3.1.3 from within Architect

 

 

rdavidwebservice • 838 views
ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by Aditya120
Answer: DAVIDWebService$new(): Error: .jinit(...) == 0 is not TRUE
1
gravatar for Aditya
4.5 years ago by
Aditya120
Germany
Aditya120 wrote:

I noticed that the error only occurs during the very first call to DAVIDWebService(). If the call is repeated a second time, no error is thrown and the call works (if R is restarted, the problem reoccurs the first time DAVIDWebService() is called): 

require(RDAVIDWebService)
david <- DAVIDWebService$new(email = 'myemailaddress')

Error: .jinit(...) == 0 is not TRUE

david <- DAVIDWebService$new(email = 'myemailaddress')   # Now it works!

 

So that suggests that for some reason .jniti() is not properly initialized within DAVIDWebService. I found that a fix is to explicitly call .jinit() before the DAVIDWebService function call.

# First start a fresh R session to ensure .jinit has not yet been run
require(RDAVIDWebService)
.jinit()
david <- DAVIDWebService$new(email = 'myemailaddress')

 

ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by Aditya120
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 341 users visited in the last hour