Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 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.

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

 
discard

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.