You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Ralf Taugerbeck (JIRA)" <ji...@apache.org> on 2007/12/10 14:12:43 UTC

[jira] Created: (CXF-1275) System property -Dcxf.config.file has no effect

System property -Dcxf.config.file has no effect
-----------------------------------------------

                 Key: CXF-1275
                 URL: https://issues.apache.org/jira/browse/CXF-1275
             Project: CXF
          Issue Type: Bug
          Components: Configuration
    Affects Versions: 2.0.3
            Reporter: Ralf Taugerbeck


I would like to specify a custom cxf configuration file to my client application (e.g. META-INF/cxf.xml), but the system property -Dcxf.config.file obviously has no effect.

Because the default constructor of ConfigurerImpl passes the name of the default config file, the corresponding code in ConfigurerImpl(String cfgFile) is never executed:

    public ConfigurerImpl(String cfgFile) {
        if (null == cfgFile) {
            cfgFile = System.getProperty(USER_CFG_FILE_PROPERTY_NAME);
        }
     ...

Could you please modifiy the code of the default constructor to:

    public ConfigurerImpl() {
        this(null);
    }

or something equivalent? I'm not sure whether this issue is fixed by the #CXF-1260 patch.

Thanks,
Ralf



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


Re: [jira] Commented: (CXF-1275) System property -Dcxf.config.file has no effect

Posted by Benson Margulies <bi...@gmail.com>.
That is a strong indication that you need URL syntax, not spring syntax.
Replace the classpath: with a URL. 

On Mon, 2007-12-10 at 06:13 -0800, Ralf Taugerbeck (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/CXF-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550083 ] 
> 
> Ralf Taugerbeck commented on CXF-1275:
> --------------------------------------
> 
> If I try your proposal I get an error message from org.apache.cxf.bus.spring.BusApplicationContext#getConfigResources
> 
> "The configuration file URL classpath:META-INF/cxf.xml is a a malformed URL."
> 
> Ralf
> 
> > System property -Dcxf.config.file has no effect
> > -----------------------------------------------
> >
> >                 Key: CXF-1275
> >                 URL: https://issues.apache.org/jira/browse/CXF-1275
> >             Project: CXF
> >          Issue Type: Bug
> >          Components: Configuration
> >    Affects Versions: 2.0.3
> >            Reporter: Ralf Taugerbeck
> >
> > I would like to specify a custom cxf configuration file to my client application (e.g. META-INF/cxf.xml), but the system property -Dcxf.config.file obviously has no effect.
> > Because the default constructor of ConfigurerImpl passes the name of the default config file, the corresponding code in ConfigurerImpl(String cfgFile) is never executed:
> >     public ConfigurerImpl(String cfgFile) {
> >         if (null == cfgFile) {
> >             cfgFile = System.getProperty(USER_CFG_FILE_PROPERTY_NAME);
> >         }
> >      ...
> > Could you please modifiy the code of the default constructor to:
> >     public ConfigurerImpl() {
> >         this(null);
> >     }
> > or something equivalent? I'm not sure whether this issue is fixed by the #CXF-1260 patch.
> > Thanks,
> > Ralf
> 


[jira] Commented: (CXF-1275) System property -Dcxf.config.file has no effect

Posted by "Ralf Taugerbeck (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550083 ] 

Ralf Taugerbeck commented on CXF-1275:
--------------------------------------

If I try your proposal I get an error message from org.apache.cxf.bus.spring.BusApplicationContext#getConfigResources

"The configuration file URL classpath:META-INF/cxf.xml is a a malformed URL."

Ralf

> System property -Dcxf.config.file has no effect
> -----------------------------------------------
>
>                 Key: CXF-1275
>                 URL: https://issues.apache.org/jira/browse/CXF-1275
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.0.3
>            Reporter: Ralf Taugerbeck
>
> I would like to specify a custom cxf configuration file to my client application (e.g. META-INF/cxf.xml), but the system property -Dcxf.config.file obviously has no effect.
> Because the default constructor of ConfigurerImpl passes the name of the default config file, the corresponding code in ConfigurerImpl(String cfgFile) is never executed:
>     public ConfigurerImpl(String cfgFile) {
>         if (null == cfgFile) {
>             cfgFile = System.getProperty(USER_CFG_FILE_PROPERTY_NAME);
>         }
>      ...
> Could you please modifiy the code of the default constructor to:
>     public ConfigurerImpl() {
>         this(null);
>     }
> or something equivalent? I'm not sure whether this issue is fixed by the #CXF-1260 patch.
> Thanks,
> Ralf

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


[jira] Commented: (CXF-1275) System property -Dcxf.config.file has no effect

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550077 ] 

Gary Tully commented on CXF-1275:
---------------------------------

I think the fix for #CXF-1260 will not help. The resolution of config in ConfigureImpl is unnecessary. The BusApplicationContext does the real work.

I think you need to use the URL version to specify the config file:
 -Dcxf.config.file.url=classpath:META-INF/cxf.xml 

Gary.


> System property -Dcxf.config.file has no effect
> -----------------------------------------------
>
>                 Key: CXF-1275
>                 URL: https://issues.apache.org/jira/browse/CXF-1275
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.0.3
>            Reporter: Ralf Taugerbeck
>
> I would like to specify a custom cxf configuration file to my client application (e.g. META-INF/cxf.xml), but the system property -Dcxf.config.file obviously has no effect.
> Because the default constructor of ConfigurerImpl passes the name of the default config file, the corresponding code in ConfigurerImpl(String cfgFile) is never executed:
>     public ConfigurerImpl(String cfgFile) {
>         if (null == cfgFile) {
>             cfgFile = System.getProperty(USER_CFG_FILE_PROPERTY_NAME);
>         }
>      ...
> Could you please modifiy the code of the default constructor to:
>     public ConfigurerImpl() {
>         this(null);
>     }
> or something equivalent? I'm not sure whether this issue is fixed by the #CXF-1260 patch.
> Thanks,
> Ralf

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


[jira] Commented: (CXF-1275) System property -Dcxf.config.file has no effect

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552012 ] 

Benson Margulies commented on CXF-1275:
---------------------------------------

I just used -Dcxf.config.file today successfully. It is a classpath, in absolute format (no leading slash). 

To diagnose problems like these, I put invalid XML into my cxf.xml and watch for the error.

 I recommend not using the name cxf.xml. Put yours at META-INF/mycxf.xml, or whatever, and -Dcxf.config.file=META-INF/mycxf.xml.



> System property -Dcxf.config.file has no effect
> -----------------------------------------------
>
>                 Key: CXF-1275
>                 URL: https://issues.apache.org/jira/browse/CXF-1275
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.0.3
>            Reporter: Ralf Taugerbeck
>
> I would like to specify a custom cxf configuration file to my client application (e.g. META-INF/cxf.xml), but the system property -Dcxf.config.file obviously has no effect.
> Because the default constructor of ConfigurerImpl passes the name of the default config file, the corresponding code in ConfigurerImpl(String cfgFile) is never executed:
>     public ConfigurerImpl(String cfgFile) {
>         if (null == cfgFile) {
>             cfgFile = System.getProperty(USER_CFG_FILE_PROPERTY_NAME);
>         }
>      ...
> Could you please modifiy the code of the default constructor to:
>     public ConfigurerImpl() {
>         this(null);
>     }
> or something equivalent? I'm not sure whether this issue is fixed by the #CXF-1260 patch.
> Thanks,
> Ralf

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


[jira] Closed: (CXF-1275) System property -Dcxf.config.file has no effect

Posted by "Ralf Taugerbeck (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Taugerbeck closed CXF-1275.
--------------------------------

    Resolution: Fixed

Thanks, that works.

> System property -Dcxf.config.file has no effect
> -----------------------------------------------
>
>                 Key: CXF-1275
>                 URL: https://issues.apache.org/jira/browse/CXF-1275
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.0.3
>            Reporter: Ralf Taugerbeck
>
> I would like to specify a custom cxf configuration file to my client application (e.g. META-INF/cxf.xml), but the system property -Dcxf.config.file obviously has no effect.
> Because the default constructor of ConfigurerImpl passes the name of the default config file, the corresponding code in ConfigurerImpl(String cfgFile) is never executed:
>     public ConfigurerImpl(String cfgFile) {
>         if (null == cfgFile) {
>             cfgFile = System.getProperty(USER_CFG_FILE_PROPERTY_NAME);
>         }
>      ...
> Could you please modifiy the code of the default constructor to:
>     public ConfigurerImpl() {
>         this(null);
>     }
> or something equivalent? I'm not sure whether this issue is fixed by the #CXF-1260 patch.
> Thanks,
> Ralf

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