logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19902] New: - PropertyConfigurator throws ExceptionInInitializerError Java 1.2.2 / Log4J 1.2.8
Date Tue, 13 May 2003 18:18:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19902>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19902

PropertyConfigurator throws ExceptionInInitializerError Java 1.2.2 / Log4J 1.2.8

           Summary: PropertyConfigurator throws ExceptionInInitializerError
                    Java 1.2.2 / Log4J 1.2.8
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Configurator
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: peter-finn@comcast.net


PropertyConfigurator in Log4j 1.2.8 appears to be broken under Java 1.2.2
The following Exception is thrown
Exception in thread "main" java.lang.ExceptionInInitializerError: 
java.lang.IllegalMonitorStateExcep
tion: current thread not owner
        at org.apache.log4j.PropertyConfigurator.doConfigure
(PropertyConfigurator.java:406)
        at org.apache.log4j.PropertyConfigurator.doConfigure
(PropertyConfigurator.java:307)
        at org.apache.log4j.PropertyConfigurator.configure
(PropertyConfigurator.java:315)
        at nml.logging.PropConfigTest.<clinit>(PropConfigTest.java:11)

The error disappears if you switch to Log4j 1.2.7 and/or Java 1.3.1.
The PropConfigTest class in the above trace is the most basic Log4J class I 
could put together. the Exception is thrown on the call to 
PropertyConfigurator.configure() - see below.

package nml.logging;
import org.apache.log4j.*;

/**
 * Invoke PropertyConfigurator to generate Error
 */
public class PropConfigTest {
	private Logger logger = Logger.getLogger(this.getClass().getName());

	static {
		PropertyConfigurator.configure(
			"C://projects//logging//log4j.properties");
	}

	public static void main(String[] args) {
		PropConfigTest minime = new PropConfigTest();
		minime.doLog();
	}
	public void doLog() {
		logger.debug("here we are");
	}

}

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Mime
View raw message