RNCan / BioSimClient_R

An R client for the BioSIM Web API
2 stars 1 forks source link

local Java server failing to start #1

Closed jake-wittman closed 1 year ago

jake-wittman commented 1 year ago

When I try to run functions from the BioSIM package I get the following error:

> library(BioSIM)
> getModelList()
Starting local Java server...
Error in J4R::connectToJava(extensionPath = path) : 
  It seems the local Java server has failed to start!

I'm not sure if this is a me issue, BioSIM issue, or J4R issue so any feedback to point me in the right direction is appreciated. When I run java in the Windows CMD window it returns the output that it's supposed to, per the J4R github page.

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] J4R_1.1.8    BioSIM_1.0.1

loaded via a namespace (and not attached):
 [1] fansi_1.0.2      assertthat_0.2.1 dplyr_1.0.8      utf8_1.2.2       crayon_1.5.0     grid_4.0.3      
 [7] R6_2.5.1         DBI_1.1.0        lifecycle_1.0.1  gtable_0.3.0     magrittr_2.0.3   scales_1.1.1    
[13] ggplot2_3.3.5    pillar_1.7.0     rlang_1.0.1      cli_3.1.0        generics_0.1.2   vctrs_0.3.8     
[19] ellipsis_0.3.2   tools_4.0.3      glue_1.6.2       purrr_0.3.4      munsell_0.5.0    compiler_4.0.3  
[25] pkgconfig_2.0.3  colorspace_2.0-3 tidyselect_1.1.2 tibble_3.1.6    
donenrique24 commented 1 year ago

Hi Jacob, Thanks for your feedback. The problem seems to comes from the J4R package. I just need you to do something so that I can confirm. When J4R tries to start the Java local server, it creates a log file in the Java temporary directory. Since your OS is Windows, it should be this folder: home\AppData\Local\Temp. The name of the file should be something like J4RServerStarter2022_09_08.log. Could you please copy and paste the content of the log in this thread? Mathieu

jake-wittman commented 1 year ago

I'm not able to find such a file. I checked the temp folder at C:\Users\MyUserName\AppData\Local\Temp and am not aware of any other Temp folder on my computer I tried re-running the code this morning to see if it would reproduce the log file. I also did a search of my whole file system for a file with J4R and these were the only files my program found: image

donenrique24 commented 1 year ago

Hi Jacob, By the look of your paths above, I got the feeling that the spaces could responsible for the bug. I managed to reproduce it on my computer. I just published new versions of J4R and BioSIM that you can download by following the instructions in the Wiki. Let me know if this solves the problem. Mathieu

jake-wittman commented 1 year ago

This seems to solved it! Thank you for your help

donenrique24 commented 1 year ago

The bug was fixed in J4R (Bug #10) and j4r_server(Bug #17). This issue is now closed.