You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Noam Ben Haim <no...@gmail.com> on 2006/01/24 14:25:26 UTC

[configuration] - Problems with XMLConfiguration and LogFactory

Hi
I am working with Jakarta commons in an Eclipse 3.2 environment. I changed
computer and since then some of my cod eis broken. It used to work but now
for the following code:

XMLConfiguration langConfig = new XMLConfiguration();
langConfig.load(path + "/langs.xml");

I get the following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.apache.commons.configuration.AbstractFileConfiguration.load(
AbstractFileConfiguration.java:180)
    at org.apache.commons.configuration.XMLConfiguration.load(
XMLConfiguration.java:353)
    at bfl.config.BFLDataManager.<init>(BFLDataManager.java:48)
    at gui.BFLApp.readConfiguration(BFLApp.java:748)
    at gui.BFLApp.open(BFLApp.java:125)
    at gui.BFLApp.main(BFLApp.java:116)
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by java.lang.NullPointerException)
(Caused by org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by java.lang.NullPointerException))
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
LogFactoryImpl.java:543)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:235)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:209)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
    at org.apache.commons.configuration.ConfigurationUtils.<clinit>(
ConfigurationUtils.java:41)
    ... 6 more
Caused by: org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by java.lang.NullPointerException)
    at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
LogFactoryImpl.java:397)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
LogFactoryImpl.java:529)
    ... 10 more
Caused by: java.lang.NullPointerException
    at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
LogFactoryImpl.java:374)
    ... 11 more


Plz advise

Thanks
Noam

Re: [configuration] - Problems with XMLConfiguration and LogFactory

Posted by Jacob Kjome <ho...@visi.com>.
You should re-prefix your email with [logging], because this isn't a
configuration issue, it's a logging issue.  The root cause is a
NullPointerException in a commons-logging class.

Jake

Quoting Noam Ben Haim <no...@gmail.com>:

> Hi
> I am working with Jakarta commons in an Eclipse 3.2 environment. I changed
> computer and since then some of my cod eis broken. It used to work but now
> for the following code:
>
> XMLConfiguration langConfig = new XMLConfiguration();
> langConfig.load(path + "/langs.xml");
>
> I get the following exception:
> Exception in thread "main" java.lang.ExceptionInInitializerError
>     at org.apache.commons.configuration.AbstractFileConfiguration.load(
> AbstractFileConfiguration.java:180)
>     at org.apache.commons.configuration.XMLConfiguration.load(
> XMLConfiguration.java:353)
>     at bfl.config.BFLDataManager.<init>(BFLDataManager.java:48)
>     at gui.BFLApp.readConfiguration(BFLApp.java:748)
>     at gui.BFLApp.open(BFLApp.java:125)
>     at gui.BFLApp.main(BFLApp.java:116)
> Caused by: org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException:
> java.lang.NullPointerException (Caused by java.lang.NullPointerException)
> (Caused by org.apache.commons.logging.LogConfigurationException:
> java.lang.NullPointerException (Caused by java.lang.NullPointerException))
>     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
> LogFactoryImpl.java:543)
>     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
> LogFactoryImpl.java:235)
>     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
> LogFactoryImpl.java:209)
>     at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
>     at org.apache.commons.configuration.ConfigurationUtils.<clinit>(
> ConfigurationUtils.java:41)
>     ... 6 more
> Caused by: org.apache.commons.logging.LogConfigurationException:
> java.lang.NullPointerException (Caused by java.lang.NullPointerException)
>     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> LogFactoryImpl.java:397)
>     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
> LogFactoryImpl.java:529)
>     ... 10 more
> Caused by: java.lang.NullPointerException
>     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> LogFactoryImpl.java:374)
>     ... 11 more
>
>
> Plz advise
>
> Thanks
> Noam
>




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