Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5379310C88 for ; Wed, 15 Jan 2014 12:51:27 +0000 (UTC) Received: (qmail 63323 invoked by uid 500); 15 Jan 2014 12:51:23 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 63213 invoked by uid 500); 15 Jan 2014 12:51:21 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 63183 invoked by uid 99); 15 Jan 2014 12:51:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jan 2014 12:51:21 +0000 Date: Wed, 15 Jan 2014 12:51:21 +0000 (UTC) From: =?utf-8?Q?Jean-Baptiste_Onofr=C3=A9_=28JIRA=29?= To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-1560?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Baptiste Onofr=C3=A9 updated KARAF-1560: ---------------------------------------- Fix Version/s: (was: 2.3.4) 2.3.5 > config:update throws ClassCastException when used on a Configuration with= boolean fields created in the web console > -------------------------------------------------------------------------= ------------------------------------------ > > Key: KARAF-1560 > URL: https://issues.apache.org/jira/browse/KARAF-1560 > Project: Karaf > Issue Type: Bug > Components: karaf-config > Affects Versions: 2.2.5 > Reporter: Hugh Rodgers > Assignee: Jean-Baptiste Onofr=C3=A9 > Priority: Minor > Fix For: 2.2.12, 2.4.0, 3.0.1, 2.3.5 > > Attachments: demo_validation.png, karaf_config_propset.png, karaf= _log.png, metatype.xml > > > I am using Karaf v2.2.5 on Windows 7. I start Karaf (using the karaf.bat > script) and create a configuration that has one or more fields that are > checkboxes (i.e., Boolean). > I then go to the Karaf command line console and issue the following > commands: > config:edit > config:propset true > config:update > When I submit the config"update command I get this exception: > 09:52:19,658 | INFO | l Console Thread | Console = | > araf.shell.console.jline.Console 242 | 14 - org.apache.karaf.shell.conso= le > - 2.2.5 | Exception caught while executing command > java.lang.ClassCastException: java.lang.Boolean cannot be cast to > java.lang.String > at > org.apache.karaf.shell.config.ConfigCommandSupport.persistConfiguration(C= onfigCommandSupport.java:161)[41:org.apache.karaf.shell.config:2.2.5] > at > org.apache.karaf.shell.config.ConfigCommandSupport.update(ConfigCommandSu= pport.java:129)[41:org.apache.karaf.shell.config:2.2.5] > at > org.apache.karaf.shell.config.UpdateCommand.doExecute(UpdateCommand.java:= 38)[41:org.apache.karaf.shell.config:2.2.5] > at > org.apache.karaf.shell.config.ConfigCommandSupport.doExecute(ConfigComman= dSupport.java:63)[41:org.apache.karaf.shell.config:2.2.5] > at > org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupp= ort.java:38)[14:org.apache.karaf.shell.console:2.2.5] > at > org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractComm= and.java:35)[14:org.apache.karaf.shell.console:2.2.5] > at > org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[= 14:org.apache.karaf.shell.console:2.2.5] > at > org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org= .apache.karaf.shell.console:2.2.5] > at > org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[= 14:org.apache.karaf.shell.console:2.2.5] > at > org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf= .shell.console:2.2.5] > at > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.ap= ache.karaf.shell.console:2.2.5] > at > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.ap= ache.karaf.shell.console:2.2.5] > at > org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionIm= pl.java:89)[14:org.apache.karaf.shell.console:2.2.5] > at > org.apache.karaf.shell.console.jline.Console.run(Console.java:221)[14:org= .apache.karaf.shell.console:2.2.5] > at java.lang.Thread.run(Thread.java:662)[:1.6.0_29] > And the configuration is not saved. > Configuration completely created/updated in the Admin Console work fine. > Likewise, configurations completely created in the command line console w= ork > fine. The issue arises only with boolean fields and what mechanism is use= d > to initially create the configuration. -- This message was sent by Atlassian JIRA (v6.1.5#6160)