Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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?

share|improve this question
up vote 5 down vote accepted

I found the answer: from the shell, inside the GlassFish directory with GlassFish running, type:

bin/asadmin create-system-properties  \

I've added the backslash to format the command in two lines, but it can be typed without it on one line.

share|improve this answer

Minor improvement. If the domain is not using the default port 4848, you can do as follow :

bash-3.2$ ./asadmin --port 9048 create-system-properties  org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
Command create-system-properties executed successfully.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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