Open MincingWords opened 11 months ago
Sorry, the confusion is from bad error messaging on our part. The error should read something like "Failed to find Java class XMLDBDriver and/or required third party libraries to write to the XML database."
In particular the JARS_LIB
was meant to find the third party Java .jar
libraries that are required for writing to XML DB (as well as some more advanced features) such as the BaseX.jar
.
The documentation is likely not clear enough here but you will want to check section 2.3.5 and the note about the jars in 4.1.
See, there's a problem there because the Linux distribution with source has no .../libs/jars. The files that are in .../libs/jars in the pre-built Windows distribution (which I've gotten to work) are
BaseX-9.5.2.jar
commons-discovery-0.5.jar
jcommon-1.0.0-rc1.jar
jfreechart-1.0.0-pre2.jar
joost-0.9.1.jar
jopt-simple-4.9.jar
poi-3.0-alpha1.jar
poi-contrib-3.0-alpha1.jar
poi-scratchpad-3.0-alpha1.jar
Now, by comparison, in the Linux distribution, either by having been there from the beginning or because I copied them there from other builds, I have these jar files in .../exe:
BaseX106.jar
BaseX950.jar
commons-discovery-0.5.jar
CSVToXML.jar
jcommon-1.0.0-rc1.jar
jfreechart-1.0.0-pre2.jar
joost-0.9.1.jar
jopt-simple-4.9.jar
ModelInterface.jar
poi-3.0-alpha1.jar
poi-contrib-3.0-alpha1.jar
poi-scratchpad-3.0-alpha1.jar
XMLDBDriver.jar
So if you're saying that the error I'm getting is because of JARS_LIB not picking up all it needs, well, JARS_LIB was already pointing at a carbon copy of .../exe. I even added the .../libs/jars from my working Windows distribution and it didn't make any difference:
~/aug_gcam/exe $ echo $JARS_LIB
/opt/openjdk-bin-17.0.6_p10/lib/*:/opt/gcam/exe/*:/home/<me>/my_gcam/gcam_7.0_internal_distribution/libs/jars/*
My run log file, for what it's worth, does contain this:
Internal exceptions (1 events):
Event: 0.015 Thread 0x00007f45355d4f00 Exception <a 'java/lang/NoClassDefFoundError'{0x00000000ff03dc58}: joptsimple/OptionException> (0x00000000ff03dc58)
thrown [src/hotspot/share/classfile/systemDictionary.cpp, line 245]
But without more fulsome error or log messages I'm running out of ideas.
This is gcam 7.0 on Gentoo Linux. I've gotten gcam.exe to build with Java enabled. /opt/gcam is my GCAM installation and at this point, once it builds, I copy the whole thing to a directory under my regular-user home directory ~/aug_gcam so that I can cd to exe underneath that directory so I can run GCAM from there.
The environment variables I set for both building and running look like this:
Now, given the above, no matter what I do with the CLASSPATH variable, this is what happens:
What's driving me nuts is that XMLDBDriver.jar is sitting right there in .../exe. To be sure, I can do this:
and I can do this:
But still the same thing happens. I feel like nothing is paying attention to CLASSPATH at all because it'll say the exact same thing if I do this:
What gives??