ClassCastException using cellar when update configuration fields.

classic Classic list List threaded Threaded
3 messages Options
SvS
Reply | Threaded
Open this post in threaded view
|

ClassCastException using cellar when update configuration fields.

SvS
Hello,

When I update a configuration value (with webconsole) an ClassCastException occure in the cellar code.

How to reproduce:
- Start karaf 2.2.5;
- Execute commands:
  o features:addurl mvn:org.apache.karaf.cellar/apache-karaf-cellar/2.2.2/xml/features
  o features:install cellar
  o features:install cellar-webconsole
- http://localhost:8181/system/console/configMgr
- Select “Apache Felix Web Console Event Plugin”;
- Change maximum event and Save;

Result:
1. In the Web Console log service:
    - Unexpected problem delivery configuration event to [org.osgi.service.cm.ConfigurationListener .....] java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
- In the ./data/log/karaf.log file:
2012-01-05 12:44:50,627 | ERROR | l.PluginServlet) | configadmin                      | ?                                   ? | 5 - org.apache.felix.configadmin - 1.2.8 | Unexpected problem delivery configuration event to [org.osgi.service.cm.ConfigurationListener, id=209, bundle=75]
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
        at org.apache.karaf.cellar.config.ConfigurationSupport.filterDictionary(ConfigurationSupport.java:119)[75:org.apache.karaf.cellar.config:2.2.2]
        at org.apache.karaf.cellar.config.LocalConfigurationListener.push(LocalConfigurationListener.java:87)[75:org.apache.karaf.cellar.config:2.2.2]
        at org.apache.karaf.cellar.config.LocalConfigurationListener.configurationEvent(LocalConfigurationListener.java:63)[75:org.apache.karaf.cellar.config:2.2.2]
        at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1832)[5:org.apache.felix.configadmin:1.2.8]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)[5:org.apache.felix.configadmin:1.2.8]
        at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]

Is there a work around or a solution for it?

Thank,
SvS
Regards,
SvS
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException using cellar when update configuration fields.

iocanel
This definitely looks like a bug. I will create a jira for that, so that we can have a fix for that in the next release which is about to go out soon.

On 5 Ιαν 2012, at 3:01 μ.μ., SvS wrote:

LocalConfigurationListener.java

Ioannis Canellos

Ioannis Canellos
http://iocanel.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: ClassCastException using cellar when update configuration fields.

jbonofre
Hi Ioannis,

we already have a Jira about this and I'm working on it:

https://issues.apache.org/jira/browse/KARAF-1147

Regards
JB

On 01/18/2012 09:10 PM, Ioannis Canellos wrote:

> This definitely looks like a bug. I will create a jira for that, so that
> we can have a fix for that in the next release which is about to go out
> soon.
>
> On 5 Ιαν 2012, at 3:01 μ.μ., SvS wrote:
>
>> LocalConfigurationListener.java
>
> *Ioannis Canellos*
> /
> *FuseSource* <http://fusesource.com/>
>
> /*/
> /Blog: http://iocanel.blogspot.com <http://iocanel.blogspot.com/>/
> /*/
> Apache Karaf <http://karaf.apache.org/>Committer & PMC
> /
> Apache Camel <http://camel.apache.org/>Committer
> /
> Apache ServiceMix <http://servicemix.apache.org/>Committer
> Apache Gora <http://incubator.apache.org/gora/> Committer
> /
> Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
> /
> /
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com