Bug #4245
openHarvester command line scripts don't execute
0%
Description
Metacat Harvester is normally launched as a Java servlet, but also has the option of being invoked manually from a pair of command-line scripts ('lib/harvester/runHarvester.bat' on Windows, 'lib/harvester/runHarvester.sh' on Linux). As of Metacat 1.9.x, execution of Metacat Harvester via the command-line scripts is not working.
Solution:
1. Additional dependencies need to be specified in the Java CLASSPATH:
a. METACAT_LIB/log4j-1.2.12.jar
b. METACAT_LIB/xalan.jar
c. METACAT_LIB/postgresql-8.0-312.jdbc3.jar (for POSTGRESQL)
2. The Harvester.java class needs the following changes:
a. Add support for log4j initialization in the 'main' method.
b. In the 'loadProperties()' method, change the PropertyService constructor from 'PropertyService.getInstance();' to 'PropertyService.getTestInstance(configDir);' where 'configDir' is a relative path to the directory where 'metacat.properties' resides.
Note: The solution implemented to resolve this problem for Metacat Harvester will also be beneficial toward the implementation of the new Metacat OAI-PMH Harvester described in Bug #3835.