JGCRI / gcam-core

GCAM -- The Global Change Analysis Model
http://jgcri.github.io/gcam-doc/
Other
279 stars 162 forks source link

SEVERE ERROR:Failed to find Java class XMLDBDriver to write to the XML database. #139

Open sanshuiii opened 3 years ago

sanshuiii commented 3 years ago

When I run gcam.exe(v4.3) on an ubuntu 18.04 system, such error occurs. I have already set the paths as follow:

export USRLIB=/usr/lib/x86_64-linux-gnu
export BOOST_LIB=${USRLIB}
export BOOST_INCLUDE=/usr/include/boost
# For Hector, which uses different definitions
export BOOSTLIB=${BOOST_LIB}
export BOOSTROOT=${BOOST_INCLUDE}
export XERCES_LIB=${USRLIB}
export XERCES_INCLUDE=/usr/include/xercesc
export JAVA_INCLUDE=${JAVA_HOME}/include
export JAVA_LIB=${JAVA_HOME}/jre/lib/amd64/server

and install packages by apt-get install. And I set

export JARS_LIB=${GCAM_HOME}/libs;${GCAM_HOME}/exe 

I add ${GCAM_HOME}/exe to JARS_LIB because I notice that there is a jar file XMLDBDriver.jar under folder exe. However, the error report is always like the following message after several rounds re recompilation..

Any ideas? Thanks a lot.

Error message:

(base) FAREAST.v-yifanshen@GCRAZGDL531:~/tep/gcam-china-v4.3/exe$ ./gcam.exe -C configurations/configuration_ref.xml
This computer software was prepared by Battelle Memorial Institute,
hereinafter the Contractor, under Contract No. DE-AC05-76RL0 1830 with
the Department of Energy (DOE). NEITHER THE GOVERNMENT NOR THE
CONTRACTOR MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
LIABILITY FOR THE USE OF THIS SOFTWARE. This notice including this
sentence must appear on any copies of this computer software.

User agrees that the Software will not be shipped, transferred or
exported into any country or used in any manner prohibited by the United
States Export Administration Act or any other applicable export laws,
restrictions or regulations (collectively the 'Export Laws'). Export of
the Software may require some form of license or other authority from
the U.S. Government, and failure to obtain such export control license
may result in criminal liability under U.S. laws. In addition, if the
Software is identified as export controlled items under the Export Laws,
User represents and warrants that User is not a citizen, or otherwise
located within, an embargoed nation (including without limitation Iran,
Syria, Sudan, Cuba, and North Korea) and that User is not otherwise
prohibited under the Export Laws from receiving the Software.

Copyright 2011 Battelle Memorial Institute.  All Rights Reserved.
Distributed as open-source under the terms of the Educational Community
License version 2.0 (ECL 2.0). http://www.opensource.org/licenses/ecl2.php

For further details, see: http://www.globalchange.umd.edu/models/gcam/

Running GCAM model code base version 4.3 revision gcam-v4.3

Parsing input files...
Parsing ../input/climate/magicc.xml scenario component.
Parsing ../input/magicc/Historical Emissions/Default Emissions Module/Default_Emissions_Input.xml scenario component.
Parsing ../input/gcam-data-system/xml/socioeconomics-xml/interest_rate.xml scenario component.
Parsing ../input/gcam-data-system/xml/socioeconomics-xml/socioeconomics_GCAM3.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/resources.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/en_supply.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/en_transformation.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/electricity.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/heat.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/hydrogen.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/en_distribution.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/industry.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/industry_incelas_gcam3.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/cement.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/cement_incelas_gcam3.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/en_Fert.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/HDDCDD_constdd_no_GCM.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/building_det.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/transportation_UCD.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/Ccoef.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/Cstorage.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/ag_For_Past_bio_base.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/ag_cost.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/ag_prodchange_ref.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/resbio_input.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/an_input.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/ag_Fert.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/land_input_1.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/land_input_2.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/land_input_3.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/protected_land_input_2.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/protected_land_input_3.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/bio_hi.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/demand_input.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/ind_urb_processing_sectors.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/all_aglu_emissions.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/all_energy_emissions.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/all_fgas_emissions.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/all_unmgd_emissions.xml scenario component.
Parsing ../input/solution/cal_broyden_config.xml scenario component.
XML parsing complete.
Starting new scenario: Reference
Starting a model run. Running period 3
Model run beginning.
Period 0: 1975
Creating an uninitialized logger solver-data-key
Model solved with last period's prices.

Period 1: 1990
Model solved normally. Iterations period 1: 89. Total iterations: 90

Period 2: 2005
Model solved normally. Iterations period 2: 82. Total iterations: 171

Period 3: 2010
Model solved normally. Iterations period 3: 122. Total iterations: 293

All model periods solved correctly.
Calling the climate model...
Model run completed.
Printing output
Starting output to XML Database.
SEVERE ERROR:Failed to find Java class XMLDBDriver to write to the XML database.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f23e9f287d0, pid=10793, tid=0x00007f23eaf9b780
#
# JRE version: OpenJDK Runtime Environment (8.0_275-b01) (build 1.8.0_275-8u275-b01-0ubuntu1~18.04-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.275-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x7527d0]
#
# Core dump written. Default location: /home/v-yifanshen/tep/gcam-china-v4.3/exe/core or core.10793
#
# An error report file with more information is saved as:
# /home/v-yifanshen/tep/gcam-china-v4.3/exe/hs_err_pid10793.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)
sanshuiii commented 3 years ago

I wonder which folder exactly I need to set it as the variable "JARS_LIB"

sanshuiii commented 3 years ago

By recomplie XMLDriver with the following steps, say

export CLASSPATH=<GCAM Workspace>/libs/jars/\*
cd <GCAM Workspace>/input/gcam-data-system/_common/ModelInterface/src
make ModelInterface.jar

export CLASSPATH=<GCAM Workspace>/libs/jars/*:<GCAM Workspace>/input/gcam-data-system/_common/ModelInterface/src/ModelInterface.jar
cd <GCAM Workspace>/cvs/objects/java/source
make clean
make install

,the previous problem has been fixed. However, something new occurs:

Starting output to XML Database.
Error occurred during initialization of VM
java.lang.UnsupportedClassVersionError: WildcardExpandingClassLoader has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2202)
        at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2188)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1449)
        at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1429)

I change my java version form java 11 to java 1.8 but not work. What can i do to fix it? thanks.

The complete log is as follow:

This computer software was prepared by Battelle Memorial Institute,
hereinafter the Contractor, under Contract No. DE-AC05-76RL0 1830 with
the Department of Energy (DOE). NEITHER THE GOVERNMENT NOR THE
CONTRACTOR MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
LIABILITY FOR THE USE OF THIS SOFTWARE. This notice including this
sentence must appear on any copies of this computer software.

User agrees that the Software will not be shipped, transferred or
exported into any country or used in any manner prohibited by the United
States Export Administration Act or any other applicable export laws,
restrictions or regulations (collectively the 'Export Laws'). Export of
the Software may require some form of license or other authority from
the U.S. Government, and failure to obtain such export control license
may result in criminal liability under U.S. laws. In addition, if the
Software is identified as export controlled items under the Export Laws,
User represents and warrants that User is not a citizen, or otherwise
located within, an embargoed nation (including without limitation Iran,
Syria, Sudan, Cuba, and North Korea) and that User is not otherwise
prohibited under the Export Laws from receiving the Software.

Copyright 2011 Battelle Memorial Institute.  All Rights Reserved.
Distributed as open-source under the terms of the Educational Community
License version 2.0 (ECL 2.0). http://www.opensource.org/licenses/ecl2.php

For further details, see: http://www.globalchange.umd.edu/models/gcam/

Running GCAM model code base version 4.3 revision gcam-v4.3

Parsing input files...
Parsing ../input/climate/magicc.xml scenario component.
Parsing ../input/magicc/Historical Emissions/Default Emissions Module/Default_Emissions_Input.xml scenario component.
Parsing ../input/gcam-data-system/xml/socioeconomics-xml/interest_rate.xml scenario component.
Parsing ../input/gcam-data-system/xml/socioeconomics-xml/socioeconomics_GCAM3.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/resources.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/en_supply.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/en_transformation.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/electricity.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/heat.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/hydrogen.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/en_distribution.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/industry.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/industry_incelas_gcam3.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/cement.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/cement_incelas_gcam3.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/en_Fert.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/HDDCDD_constdd_no_GCM.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/building_det.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/transportation_UCD.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/Ccoef.xml scenario component.
Parsing ../input/gcam-data-system/xml/energy-xml/Cstorage.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/ag_For_Past_bio_base.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/ag_cost.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/ag_prodchange_ref.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/resbio_input.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/an_input.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/ag_Fert.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/land_input_1.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/land_input_2.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/land_input_3.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/protected_land_input_2.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/protected_land_input_3.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/bio_hi.xml scenario component.
Parsing ../input/gcam-data-system/xml/aglu-xml/demand_input.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/ind_urb_processing_sectors.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/all_aglu_emissions.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/all_energy_emissions.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/all_fgas_emissions.xml scenario component.
Parsing ../input/gcam-data-system/xml/emissions-xml/all_unmgd_emissions.xml scenario component.
Parsing ../input/solution/cal_broyden_config.xml scenario component.
XML parsing complete.
Starting new scenario: Reference
Starting a model run. Running period 2
Model run beginning.
Period 0: 1975
Creating an uninitialized logger solver-data-key
Model solved with last period's prices.

Period 1: 1990
Model solved normally. Iterations period 1: 89. Total iterations: 90

Period 2: 2005
Model solved normally. Iterations period 2: 82. Total iterations: 171

All model periods solved correctly.
Calling the climate model...
Model run completed.
Printing output
Starting output to XML Database.
Error occurred during initialization of VM
java.lang.UnsupportedClassVersionError: WildcardExpandingClassLoader has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2202)
        at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2188)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1449)
        at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1429)