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 CD1409125 for ; Mon, 18 Jun 2012 15:01:45 +0000 (UTC) Received: (qmail 4736 invoked by uid 500); 18 Jun 2012 15:01:45 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 4711 invoked by uid 500); 18 Jun 2012 15:01:45 -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 4548 invoked by uid 99); 18 Jun 2012 15:01:45 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2012 15:01:45 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 65D6114285F for ; Mon, 18 Jun 2012 15:01:45 +0000 (UTC) Date: Mon, 18 Jun 2012 15:01:45 +0000 (UTC) From: "Hugh Rodgers (JIRA)" To: issues@karaf.apache.org Message-ID: <1795850405.25151.1340031705419.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (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: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Hugh Rodgers created KARAF-1560: ----------------------------------- Summary: 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 Priority: Minor 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.console - 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(ConfigCommandSupport.java:161)[41:org.apache.karaf.shell.config:2.2.5] at org.apache.karaf.shell.config.ConfigCommandSupport.update(ConfigCommandSupport.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(ConfigCommandSupport.java:63)[41:org.apache.karaf.shell.config:2.2.5] at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.2.5] at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.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.apache.karaf.shell.console:2.2.5] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.2.5] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.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 work fine. The issue arises only with boolean fields and what mechanism is used to initially create the configuration. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira