You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ivanhoe Abrahams <iv...@gmail.com> on 2013/03/06 09:00:10 UTC

DOSGI pid cxf-dsw

Hi I started playing with cxf-dosgi.

I am running the snapshot-1.5.0 version in apache felix, but I get the
following error message when starting up
''No RemoteServiceAdmin available! Unable to export service from....."

I debugged through this and the error appears because the cxf-dsw bundle
uses the ConfigAdmin to read in configuration data.
The PID for this configurable bundle is cxf-dsw.

So what happens is that at a certain point the updated method gets called
but with a null parameter

So if you look at the following method in the Activator, this means that
the DSW service will be stopped and all discovered services will be
unloaded but never reloaded
because of the null parameter.

<CODE>

    @SuppressWarnings({ "rawtypes", "unchecked" })
    public synchronized void updated(Dictionary config) throws
ConfigurationException {
        if (rsaFactoryReg != null) {
            try {
                stop(bc);
            } catch (Exception e) {
                LOG.error(e.getMessage(), e);
            }
        }
        if (config != null) {
            Map<String, Object> configMap = getMapFromDictionary(config);
            start(bc, configMap);
        }
    }

</CODE>

If I change the code to return out of the method when the config parameter
is null, everything loads fine, but the question still begs what
configuration (file) should be provided whith which properties?

So my question is.
Which configuration paramaters should i be configuring in the .cfg or
propeties file for this Service? And what will be the name for that file? I
am talking about the config properties that felix-fileinstall is going to
load?
I have tried to find documentation on this but have'nt found anything. My
apologies if this is documented somewhere.

Hope the explanation of the problem is clear enough.

O, I am running on Windows, JDK1.7, Felix 4.2.0

Regards
Ivanhoe

Re: DOSGI pid cxf-dsw

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Invanhoe,

the cxf-dsw pid currently can contain httpBase and cxfServletAlias.
httpBase defaults to "http://" + LocalHostUtil.getLocalIp() + ":8181" 
and cxfServletAlias defaults to "/cxf".

Normally it should work when the config is not present. You can try to 
create the config and set the attributes above.
Not sure why I did not see this problem when testing on karaf as I do 
not create the config.

Christian


On 06.03.2013 09:00, Ivanhoe Abrahams wrote:
> Hi I started playing with cxf-dosgi.
>
> I am running the snapshot-1.5.0 version in apache felix, but I get the
> following error message when starting up
> ''No RemoteServiceAdmin available! Unable to export service from....."
>
> I debugged through this and the error appears because the cxf-dsw bundle
> uses the ConfigAdmin to read in configuration data.
> The PID for this configurable bundle is cxf-dsw.
>
> So what happens is that at a certain point the updated method gets called
> but with a null parameter
>
> So if you look at the following method in the Activator, this means that
> the DSW service will be stopped and all discovered services will be
> unloaded but never reloaded
> because of the null parameter.
>
> <CODE>
>
>      @SuppressWarnings({ "rawtypes", "unchecked" })
>      public synchronized void updated(Dictionary config) throws
> ConfigurationException {
>          if (rsaFactoryReg != null) {
>              try {
>                  stop(bc);
>              } catch (Exception e) {
>                  LOG.error(e.getMessage(), e);
>              }
>          }
>          if (config != null) {
>              Map<String, Object> configMap = getMapFromDictionary(config);
>              start(bc, configMap);
>          }
>      }
>
> </CODE>
>
> If I change the code to return out of the method when the config parameter
> is null, everything loads fine, but the question still begs what
> configuration (file) should be provided whith which properties?
>
> So my question is.
> Which configuration paramaters should i be configuring in the .cfg or
> propeties file for this Service? And what will be the name for that file? I
> am talking about the config properties that felix-fileinstall is going to
> load?
> I have tried to find documentation on this but have'nt found anything. My
> apologies if this is documented somewhere.
>
> Hope the explanation of the problem is clear enough.
>
> O, I am running on Windows, JDK1.7, Felix 4.2.0
>
> Regards
> Ivanhoe
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com