commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-282) NPE in HierarchicalConfiguration.fetchNodeList
Date Mon, 02 Jul 2007 19:55:09 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509651
] 

Oliver Heger commented on CONFIGURATION-282:
--------------------------------------------

So, the cause for this problem seems to be the static field for the default expression engine
in HierarchicalConfiguration. After a redeploy it obviously looses its value and is set to
null.

I guess, it should be possible to initialize it lazily when it is accessed and it is null.
But then the getDefaultExpressionEngine() method has to be synchronized. Does anybody have
a better idea? There are probably other static fields in other classes, which can cause similar
problems.

> NPE in HierarchicalConfiguration.fetchNodeList
> ----------------------------------------------
>
>                 Key: CONFIGURATION-282
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-282
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: Linux, Java 1.5
>            Reporter: Dennis Kieselhorst
>
> java.lang.NullPointerException
>         at org.apache.commons.configuration.HierarchicalConfiguration.fetchNodeList(HierarchicalConfiguration.java:721)
>         at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.fetchNodeList(AbstractHierarchicalFileConfiguration.java:338)
>         at org.apache.commons.configuration.HierarchicalConfiguration.getProperty(HierarchicalConfiguration.java:284)
>         at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.getProperty(AbstractHierarchicalFileConfiguration.java:319)
>         at org.apache.commons.configuration.AbstractConfiguration.resolveContainerStore(AbstractConfiguration.java:1222)
>         at org.apache.commons.configuration.AbstractConfiguration.getBoolean(AbstractConfiguration.java:667)
>         at org.apache.commons.configuration.AbstractConfiguration.getBoolean(AbstractConfiguration.java:633)
> java.lang.NullPointerException
>         at org.apache.commons.configuration.HierarchicalConfiguration.fetchNodeList(HierarchicalConfiguration.java:721)
>         at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.fetchNodeList(AbstractHierarchicalFileConfiguration.java:338)
>         at org.apache.commons.configuration.HierarchicalConfiguration.getProperty(HierarchicalConfiguration.java:284)
>         at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.getProperty(AbstractHierarchicalFileConfiguration.java:319)
>         at org.apache.commons.configuration.AbstractConfiguration.resolveContainerStore(AbstractConfiguration.java:1222)
>         at org.apache.commons.configuration.AbstractConfiguration.getString(AbstractConfiguration.java:1097)
>         at org.apache.commons.configuration.AbstractConfiguration.getString(AbstractConfiguration.java:1077)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message