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 running GCAMv5.4 on linux: XMLDBDriver not found #154

Closed
cgnolte opened this issue Jul 15, 2021 · 2 comments
Closed

error running GCAMv5.4 on linux: XMLDBDriver not found #154

cgnolte opened this issue Jul 15, 2021 · 2 comments

Comments

@cgnolte
Copy link

cgnolte commented Jul 15, 2021

I am able to compile GCAMv5.4. However, I get a runtime error:
SEVERE ERROR:Failed to find Java class XMLDBDriver to write to the XML database.

A core dump and an error log file are generated on my system. The logfile specifies the java_class_path begins with XMLDBDriver.jar, then all the jars in libs/jars, then ../output/modelinterface/ModelInterface.jar. However, XMLDBDriver.jar exists in my exe directory, and all the jars appear to be specified correctly. I recompiled XMLDBDriver.jar successfully, but got the same error.

I traced where the classpath is set to the createContainer method in cvs/objects/reporting/source/xml_db_outputter.cpp. The part of createContainer where the classpath is set does not appear to have changed from v5.2, but I do not have this problem running v5.2.

Thanks for any assistance resolving this issue!

@cgnolte
Copy link
Author

cgnolte commented Jul 16, 2021

I figured out the issue.
In previous versions of GCAM, I had modified cvs/objects/build/linux/configure.gcam, setting the needed environment variables for BOOST, XERCES, JARS_LIB, etc. In following the build instructions for v5.4, I saw that the intended way to do this is to leave configure.gcam unedited and instead set those environment variables prior to invoking make.

For traceability I wanted to put this into a script. I usually use csh, and this is where the problem crept in.
setenv JARS_LIB ${GCAM_HOME}/libs/jars/* resulted in the wildcard expansion happening prior to compilation, so that -DJARS_LIB was a long string of space-separated individual jar files.

Changing the above line to
setenv JARS_LIB "${GCAM_HOME/libs/jars/*" solved the problem.
Using bash also solves the problem, and maybe that's the real answer.

@cgnolte cgnolte closed this as completed Jul 16, 2021
@pralitp
Copy link
Contributor

pralitp commented Jul 16, 2021

Great, I am glad you were able to figure it out. I was going to chime in that between GCAM 5.2 and 5.4 we upgraded the BaseX library version from 8.6.7 to 9.5.x and perhaps that was the source of your issue. It seems this was not the issue in your case however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants