You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2013/03/04 21:51:12 UTC

[jira] [Commented] (CONFIGURATION-528) ConfigurationInterpolator class does not load if security manager enabled

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

Oliver Heger commented on CONFIGURATION-528:
--------------------------------------------

We are currently working on version 2.0 of Commons Configuration, and there have been some major changes, also in the area of interpolation. The problem you describe is probably solved in the meantime.

{{ConfigurationInterpolator}} still instantiates default lookups in a static block. However, {{EnvironmentLookup}} no longer uses {{EnvironmentConfiguration}}; rather it queries the environment in its {{lookup()}} method. So the security manager should only complain if environment variables are acutally used for interpolation.

Is this solution okay for you or do you have another proposal?
                
> ConfigurationInterpolator class does not load if security manager enabled
> -------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-528
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-528
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Interpolation
>    Affects Versions: 1.9
>            Reporter: Laurent Sauvage
>            Priority: Minor
>
> ConfigurationInterpolator class does not load if security manager is enabled because its static initializer instantiate EnvironmentLookup which instantiate EnvironmentConfiguration which use System.getenv()in its constructor. But System.getenv() can fail if RuntimePermission("getenv.*") is not granted.
> Notice this "bug" is annoying to catch because a NoClassDefFoundError is thrown when classloading ConfigurationInterpolator without the good AccessControlException showing the real source of the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira