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?

link|improve this question

70% accept rate
feedback

1 Answer

up vote 1 down vote accepted

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.