You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2003/04/17 14:22:08 UTC

DO NOT REPLY [Bug 19109] New: - need to wrap log4j

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=19109>.
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=19109

need to wrap log4j

           Summary: need to wrap log4j
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Configurator
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: kurt2002@fastmail.fm


i am using Java 1.2.2_014

following code works fine with log4j-1.2.6 but not with 1.2.8:

    String confParm = "apacheLog.cfg";
    try {
      // PropertyConfigurator
      Class apachePropConf =
        Class.forName("org.apache.log4j.PropertyConfigurator");
      // do configuration now
      Method m =
        apachePropConf.getMethod(
          "configure",
          new Class[] { confParm.getClass()});
      m.invoke(null, new Object[] { confParm });
    } catch (Throwable e) {
      e.printStackTrace();
    }


following exception is thrown:

java.lang.reflect.InvocationTargetException: 
java.lang.IllegalMonitorStateException: 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 java.lang.reflect.Method.invoke(Native Method)
	at 
com.bsbanksysteme.clt.std.WebApplication.testit(WebApplication.java:846)
	at 
com.bsbanksysteme.clt.std.WebApplication.main(WebApplication.java:858)

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