SOLVED: Added 'log4j.properties' file to 'bin' subdirectory of relex,
see [code] below.
CAUSE: Need to have 'log4j.xml' or 'log4j.properties' in -classpath.
CLUE: Add '-Dlog4j.debug=true' to the 'java' invocation in 'relation-
extractor.sh', which then said:
[quote]
log4j: Trying to find [log4j.xml] using context classloader
sun.misc.Launcher$AppClassLoader@35a16869.
log4j: Trying to find [log4j.xml] using sun.misc.Launcher
$AppClassLoader@35a16869 class loader.
log4j: Trying to find [log4j.xml] using
ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader
sun.misc.Launcher$AppClassLoader@35a16869.
log4j: Trying to find [log4j.properties] using sun.misc.Launcher
$AppClassLoader@35a16869 class loader.
log4j: Trying to find [log4j.properties] using
ClassLoader.getSystemResource().
log4j: Could not find resource: [null].
[/quote]
As Linas suspected, I must have installed something manually, although
I usually do try to use synaptic (Ubuntu 10.04 Lucid, kernel 2.6.32-29-
generic #58 Ubuntu SMP x86_64). At least I have a prior install of
WordNet, which I do not want to blow away because it is used by
applications I installed before RelEx.
Further, both 'openjdk-6' and 'sun-java6' are installed on my system
(not to mention 'gcj-4.4'), with the 'sun' flavor selected in /etc/
alternatives. According to '
http://wiki.opencog.org/w/
RelEx#Relex_Standalone_Installation_Procedure_(without_Opencog)'
openjdk is preferred, but I do not know how much damage that would do
to me.
<rant>The existence of two Java systems is antithetical to the "write
once, run anywhere" mantra. Someone should be shot, or at least
defenestrated.</rant>
If some kind soul using ReLex would post the result of 'locate
log4j.properties' I would be most appreciative. The standard contents
would be nice, too.
As frustrating as this exercise was, it brought me to the realization
that it is absolutely astounding that something with as many moving
parts as RelEx can be made to work at all. Thanks, Linas.
// ------------------------------------------------------------------
Here is the contents of a 'log4j.properties' file that works:
[code]
# simple log4j properties / configuration file
# after
http://www.devdaily.com/blog/post/java/simple-log4j-example
log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.Stdout.layout.ConversionPattern=%d %p [%t] %C{1} - %m\n
log4j.rootLogger=INFO,Stdout
[/code]