You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Pierre De Rop <pi...@gmail.com> on 2012/07/25 15:17:46 UTC

SCR logs "Unknown ConfigurationEvent type" with ConfigAdmin 1.4.0

Hi everyone;

Using SCR and latest ConfigAdmin 1.4.0, I always have the following message
logged by SCR in WARN:
->

    Unknown ConfigurationEvent type 3


This message is logged by SCR, from the
ConfigurationSupport.configurationEvent(ConfigurationEvent event) method,
which gets the new CM "CM_LOCATION_CHANGED (3)" event (it's a new event
fired by CM, from compendium 4.3):

           public void configurationEvent(ConfigurationEvent event)
                ...
            if (!cm.getComponentMetadata().isConfigurationIgnored())
            {
                switch (event.getType()) {
                case ConfigurationEvent.CM_DELETED:
                        ....

                case ConfigurationEvent.CM_UPDATED:
                        ....

                default:
                    Activator.log(LogService.LOG_WARNING, null, "Unknown
ConfigurationEvent type " + event.getType(),
                        null);
                }

THE CM_LOCATION_CHANGED event is caught by the SCR configuration listener,
probably because we are creating CM configuration objects in our product,
using null configuration location binding.

So, I have two following questions:

1) don't you think that the log message should be logged in LOG_INFO level,
instead of LOG_WARN level ?
(I have many many such logs when starting my application).

2) I wonder if we should do something special in the SCR
ConfigurationSupport.configurationEvent() method, when handling this new
CM_LOCATION_CHANGED event ?

kind regards;
/Pierre

Re: SCR logs "Unknown ConfigurationEvent type" with ConfigAdmin 1.4.0

Posted by Pierre De Rop <pi...@gmail.com>.
Hi Felix,

thanks for having created the issue.

kind regards;
/pierre

On Fri, Jul 27, 2012 at 4:18 PM, Felix Meschberger <fm...@adobe.com>wrote:

> Hi,
>
> I have logged https://issues.apache.org/jira/browse/FELIX-3584 to
> actually add support for this event to the SCR implementation (with the
> goal of reassigning configuration as done by config admin, too)
>
> Am 25.07.2012 um 15:17 schrieb Pierre De Rop:
>
> > Hi everyone;
> >
> > Using SCR and latest ConfigAdmin 1.4.0, I always have the following
> message
> > logged by SCR in WARN:
> > ->
> >
> >    Unknown ConfigurationEvent type 3
> >
> >
> > This message is logged by SCR, from the
> > ConfigurationSupport.configurationEvent(ConfigurationEvent event) method,
> > which gets the new CM "CM_LOCATION_CHANGED (3)" event (it's a new event
> > fired by CM, from compendium 4.3):
> >
> >           public void configurationEvent(ConfigurationEvent event)
> >                ...
> >            if (!cm.getComponentMetadata().isConfigurationIgnored())
> >            {
> >                switch (event.getType()) {
> >                case ConfigurationEvent.CM_DELETED:
> >                        ....
> >
> >                case ConfigurationEvent.CM_UPDATED:
> >                        ....
> >
> >                default:
> >                    Activator.log(LogService.LOG_WARNING, null, "Unknown
> > ConfigurationEvent type " + event.getType(),
> >                        null);
> >                }
> >
> > THE CM_LOCATION_CHANGED event is caught by the SCR configuration
> listener,
> > probably because we are creating CM configuration objects in our product,
> > using null configuration location binding.
> >
> > So, I have two following questions:
> >
> > 1) don't you think that the log message should be logged in LOG_INFO
> level,
> > instead of LOG_WARN level ?
> > (I have many many such logs when starting my application).
>
> We should explicitly catch CM_LOCATION_CHANGED to handle (FELIX-3584). But
> I think we should keep the WARN level message for unknown event types.
>
> >
> > 2) I wonder if we should do something special in the SCR
> > ConfigurationSupport.configurationEvent() method, when handling this new
> > CM_LOCATION_CHANGED event ?
>
> Yes, see browse/FELIX-3584
>
> Regards
> Felix
>
> >
> > kind regards;
> > /Pierre
>
>

Re: SCR logs "Unknown ConfigurationEvent type" with ConfigAdmin 1.4.0

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

I have logged https://issues.apache.org/jira/browse/FELIX-3584 to actually add support for this event to the SCR implementation (with the goal of reassigning configuration as done by config admin, too)

Am 25.07.2012 um 15:17 schrieb Pierre De Rop:

> Hi everyone;
> 
> Using SCR and latest ConfigAdmin 1.4.0, I always have the following message
> logged by SCR in WARN:
> ->
> 
>    Unknown ConfigurationEvent type 3
> 
> 
> This message is logged by SCR, from the
> ConfigurationSupport.configurationEvent(ConfigurationEvent event) method,
> which gets the new CM "CM_LOCATION_CHANGED (3)" event (it's a new event
> fired by CM, from compendium 4.3):
> 
>           public void configurationEvent(ConfigurationEvent event)
>                ...
>            if (!cm.getComponentMetadata().isConfigurationIgnored())
>            {
>                switch (event.getType()) {
>                case ConfigurationEvent.CM_DELETED:
>                        ....
> 
>                case ConfigurationEvent.CM_UPDATED:
>                        ....
> 
>                default:
>                    Activator.log(LogService.LOG_WARNING, null, "Unknown
> ConfigurationEvent type " + event.getType(),
>                        null);
>                }
> 
> THE CM_LOCATION_CHANGED event is caught by the SCR configuration listener,
> probably because we are creating CM configuration objects in our product,
> using null configuration location binding.
> 
> So, I have two following questions:
> 
> 1) don't you think that the log message should be logged in LOG_INFO level,
> instead of LOG_WARN level ?
> (I have many many such logs when starting my application).

We should explicitly catch CM_LOCATION_CHANGED to handle (FELIX-3584). But I think we should keep the WARN level message for unknown event types.

> 
> 2) I wonder if we should do something special in the SCR
> ConfigurationSupport.configurationEvent() method, when handling this new
> CM_LOCATION_CHANGED event ?

Yes, see browse/FELIX-3584

Regards
Felix

> 
> kind regards;
> /Pierre