You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Imran M Yousuf (Created) (JIRA)" <se...@james.apache.org> on 2011/12/15 06:33:30 UTC
[jira] [Created] (JAMES-1353) Make configuration prefix
configurable in ConfigurationProviderImpl
Make configuration prefix configurable in ConfigurationProviderImpl
-------------------------------------------------------------------
Key: JAMES-1353
URL: https://issues.apache.org/jira/browse/JAMES-1353
Project: JAMES Server
Issue Type: Improvement
Components: Spring Container
Affects Versions: 3.0-beta3
Reporter: Imran M Yousuf
Priority: Critical
I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:
org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29
I want to make it configurable so that it can be changed if and as required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] [Commented] (JAMES-1353) Make configuration prefix
configurable in ConfigurationProviderImpl
Posted by "Steve Brewin (Commented) (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171123#comment-13171123 ]
Steve Brewin commented on JAMES-1353:
-------------------------------------
A simple workaround would be to create a symlink on the file system to redirect the ../conf directory to the desired location.
A James specific solution might be to modify the code to process a properties file (eg: james.properties) containing override locations. This would be loaded from the classpath.
Contributions welcome.
> Make configuration prefix configurable in ConfigurationProviderImpl
> -------------------------------------------------------------------
>
> Key: JAMES-1353
> URL: https://issues.apache.org/jira/browse/JAMES-1353
> Project: JAMES Server
> Issue Type: Improvement
> Components: Spring Container
> Affects Versions: 3.0-beta3
> Reporter: Imran M Yousuf
> Priority: Minor
> Labels: patch
>
> I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:
> org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29
> I want to make it configurable so that it can be changed if and as required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] [Commented] (JAMES-1353) Make configuration prefix
configurable in ConfigurationProviderImpl
Posted by "Eric Charles (Commented) (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171817#comment-13171817 ]
Eric Charles commented on JAMES-1353:
-------------------------------------
Trunk has evolved to conf loading via classpath (see also https://issues.apache.org/jira/browse/JAMES-1002).
Does this issue still arise with current trunk?
Thx, Eric
> Make configuration prefix configurable in ConfigurationProviderImpl
> -------------------------------------------------------------------
>
> Key: JAMES-1353
> URL: https://issues.apache.org/jira/browse/JAMES-1353
> Project: JAMES Server
> Issue Type: Improvement
> Components: Spring Container
> Affects Versions: 3.0-beta3
> Reporter: Imran M Yousuf
> Priority: Minor
> Labels: patch
>
> I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:
> org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29
> I want to make it configurable so that it can be changed if and as required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] [Updated] (JAMES-1353) Make configuration prefix
configurable in ConfigurationProviderImpl
Posted by "Steve Brewin (Updated) (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Brewin updated JAMES-1353:
--------------------------------
Priority: Minor (was: Critical)
Dropped the priority to minor to reflect its priority for the majority of James users. This is an atypical use-case.
> Make configuration prefix configurable in ConfigurationProviderImpl
> -------------------------------------------------------------------
>
> Key: JAMES-1353
> URL: https://issues.apache.org/jira/browse/JAMES-1353
> Project: JAMES Server
> Issue Type: Improvement
> Components: Spring Container
> Affects Versions: 3.0-beta3
> Reporter: Imran M Yousuf
> Priority: Minor
> Labels: patch
>
> I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:
> org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29
> I want to make it configurable so that it can be changed if and as required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] [Commented] (JAMES-1353) Make configuration prefix
configurable in ConfigurationProviderImpl
Posted by "Imran M Yousuf (Commented) (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171434#comment-13171434 ]
Imran M Yousuf commented on JAMES-1353:
---------------------------------------
@Steve thanks for the feedback. The james.properties idea seems pretty interesting. I will working on it and submit patches to them soon.
> Make configuration prefix configurable in ConfigurationProviderImpl
> -------------------------------------------------------------------
>
> Key: JAMES-1353
> URL: https://issues.apache.org/jira/browse/JAMES-1353
> Project: JAMES Server
> Issue Type: Improvement
> Components: Spring Container
> Affects Versions: 3.0-beta3
> Reporter: Imran M Yousuf
> Priority: Minor
> Labels: patch
>
> I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:
> org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29
> I want to make it configurable so that it can be changed if and as required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] [Commented] (JAMES-1353) Make configuration prefix
configurable in ConfigurationProviderImpl
Posted by "Imran M Yousuf (Commented) (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171822#comment-13171822 ]
Imran M Yousuf commented on JAMES-1353:
---------------------------------------
As I can see it changed from file://conf/ to classpath:, but what I want is to be to able to configure what the prefix would be, but with a default value set, so that some one can modify the configurations in an embedded environment, e.g., automated integration test environment.
https://github.com/imyousuf/james/blob/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java
[Checked on Dec 18, 2011, 0900GMT]
> Make configuration prefix configurable in ConfigurationProviderImpl
> -------------------------------------------------------------------
>
> Key: JAMES-1353
> URL: https://issues.apache.org/jira/browse/JAMES-1353
> Project: JAMES Server
> Issue Type: Improvement
> Components: Spring Container
> Affects Versions: 3.0-beta3
> Reporter: Imran M Yousuf
> Priority: Minor
> Labels: patch
>
> I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:
> org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29
> I want to make it configurable so that it can be changed if and as required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] [Issue Comment Edited] (JAMES-1353) Make configuration
prefix configurable in ConfigurationProviderImpl
Posted by "Steve Brewin (Issue Comment Edited) (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171118#comment-13171118 ]
Steve Brewin edited comment on JAMES-1353 at 12/16/11 6:32 PM:
---------------------------------------------------------------
Dropped the priority to minor to reflect its priority for the majority of James users. This is not critical as it is an atypical use-case.
was (Author: sbrewin@apache.org):
Dropped the priority to minor to reflect its priority for the majority of James users. This is an atypical use-case.
> Make configuration prefix configurable in ConfigurationProviderImpl
> -------------------------------------------------------------------
>
> Key: JAMES-1353
> URL: https://issues.apache.org/jira/browse/JAMES-1353
> Project: JAMES Server
> Issue Type: Improvement
> Components: Spring Container
> Affects Versions: 3.0-beta3
> Reporter: Imran M Yousuf
> Priority: Minor
> Labels: patch
>
> I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:
> org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29
> I want to make it configurable so that it can be changed if and as required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] [Commented] (JAMES-1353) Make configuration prefix
configurable in ConfigurationProviderImpl
Posted by "Eric Charles (Commented) (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171921#comment-13171921 ]
Eric Charles commented on JAMES-1353:
-------------------------------------
So you are asking for a "configurable" configuration loading :)
Btw, if you add the folder with you configuration files to your classpath (with java 6), you have for free what your are looking for (place the configuration files in any folder).
> Make configuration prefix configurable in ConfigurationProviderImpl
> -------------------------------------------------------------------
>
> Key: JAMES-1353
> URL: https://issues.apache.org/jira/browse/JAMES-1353
> Project: JAMES Server
> Issue Type: Improvement
> Components: Spring Container
> Affects Versions: 3.0-beta3
> Reporter: Imran M Yousuf
> Priority: Minor
> Labels: patch
>
> I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:
> org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
> at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29
> I want to make it configurable so that it can be changed if and as required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org