Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error establishing db connection #86

Closed
Bishop17 opened this issue May 1, 2023 · 5 comments
Closed

Error establishing db connection #86

Bishop17 opened this issue May 1, 2023 · 5 comments
Assignees

Comments

@Bishop17
Copy link

Bishop17 commented May 1, 2023

Hello,
I am experiencing an issue establishing the connection using localDBconn. The error is somewhat similar to #55 in referring to a temp file that does not exist. There is a new temp file named in the error every time the attempt is repeated. Any help appreciated.

connection<-localDBConn('C:/Users/14065/Documents/GCAM/gcam-v6.0-Windows-Release-Package/output','database_basexdb') Error: 'C:\Users\14065\AppData\Local\Temp\RtmpgTXML2\file95012293665' does not exist.

Tried:
Uninstalling and reinstalling RGCAM
Running with GCAM model interface open and closed
Setting new R working directory, so that wd is not the same as the GCAM directory
Two different machines
Uninstalling and reinstalling R
Reverting from R 4.3.0 to R 4.2.3
GCAM directory on cloud vs on local disc
Adjusting the RGCAM memory limit up to 4g

@trwaite
Copy link
Collaborator

trwaite commented May 2, 2023

Hi @Bishop17. To check if rgcam is finding the right Java version, could you try running the following in R:
system2("java", "-cp C:\\Users\\14065\\Documents\\GCAM\\gcam-v6.0-Windows-Release-Package\\libs/jars\\*;C:\\Users\\14065\\Documents\\gcam-v6.0-Windows-Release-Package\\exe\\XMLDBDriver.jar XMLDBDriver --print-java-home")

@Bishop17
Copy link
Author

Bishop17 commented May 2, 2023

Thanks for the help. When I enter this string I get it back as an output with no errors.
system2("java", "-cp C:\\Users\\14065\\Documents\\GCAM\\gcam-v6.0-Windows-Release-Package\\libs/jars\\*;C:\\Users\\14065\\Documents\\gcam-v6.0-Windows-Release-Package\\exe\\XMLDBDriver.jar XMLDBDriver --print-java-home")

@Bishop17
Copy link
Author

Bishop17 commented May 2, 2023

Thanks for the help. When I enter this string I get it back as an output with no errors. system2("java", "-cp C:\\Users\\14065\\Documents\\GCAM\\gcam-v6.0-Windows-Release-Package\\libs/jars\\*;C:\\Users\\14065\\Documents\\gcam-v6.0-Windows-Release-Package\\exe\\XMLDBDriver.jar XMLDBDriver --print-java-home")

To clarify, the localDBconn function error persists. Am I running the check properly?

@trwaite
Copy link
Collaborator

trwaite commented May 2, 2023

Apologies, there was a typo in my previous reply-- both paths passed to the function should match the path to your gcam folder:
system2("java", "-cp C:\\Users\\14065\\Documents\\GCAM\\gcam-v6.0-Windows-Release-Package\\libs/jars\\*;C:\\Users\\14065\\Documents\\GCAM\\gcam-v6.0-Windows-Release-Package\\exe\\XMLDBDriver.jar XMLDBDriver --print-java-home")

@trwaite
Copy link
Collaborator

trwaite commented May 4, 2023

Update: the issue was related to the Java version/ installation (likely preventing writing to a temporary file). Installing 64-bit Java for Windows Version 8 Update 371 resolved the problem.

@trwaite trwaite closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants