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 2004/12/04 01:57:46 UTC

DO NOT REPLY [Bug 32527] New: - log4j initialization in java1.3 no dom in class path.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32527>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32527

           Summary: log4j initialization in java1.3 no dom in class path.
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configurator
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: skarzhevskyy@gmail.com


If I have log4j.xml  file in calss path and don't have any dom implementation.

It would be nice to catch java.lang.NoClassDefFoundError error and not load 
xml file at all.
now it just want initialize the program at all. And Java error mesage is not 
so descriptive as usual. So Untill I caught the exception myself I could not 
figure out why and what call is missing.

This is how this looks:
Exception in thread "main" java.lang.NoClassDefFoundError
        at uut.TastCase01.method1(TastCase01.java:61)
        at uut.TastCase01.main(TastCase01.java:45)


I'm using: log4j-1.2.9.jar, jdk1.3.1_11, Windows XP,

Also I have -Dlog4j.configuration=log4jJour.xml
and log4jJour.xml is in calss path.

If I have:
} catch (NoClassDefFoundError e) {
  e.printStackTrace();
}

then I could see:
java.lang.NoClassDefFoundError: org/w3c/dom/Node
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:232)
        at 
org.apache.log4j.helpers.OptionConverter.instantiateByClassNameOptionConverter.
java:319)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure
(OptionConverter.java:449
)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
        at org.apache.log4j.Logger.getLogger(Logger.java:107)
        at net.sf.jour.util.PropertiesBase.<clinit>(PropertiesBase.java:47)

-- 
Vlad

ps

public class PropertiesBase  {

/*line 47*/	protected static final Logger log = Logger.getLogger
(PropertiesBase.class);

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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