how to set ENABLE_CLEAR_REFERENCES in GlassFish 3.1.1?
I'm running GlassFish 3.1.1 on Linux and in my server.log I've noticed the following error:
SEVERE: log4j:ERROR log4j called after unloading, see
http://logging.apache.org/log4j/1.2/faq.html#unload.
SEVERE: java.lang.IllegalStateException: Class invariant violation
Looking at the URL provided, it suggests to "Set the org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES system property to false."
How do I do that?
I found the answer: from the shell, inside the GlassFish directory with GlassFish running, type:
bin/asadmin create-system-properties \
org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
I've added the backslash to format the command in two lines, but it can be typed without it on one line.