You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Hugh Rodgers (JIRA)" <ji...@apache.org> on 2012/06/18 17:01:45 UTC

[jira] [Created] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

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 <PID of configuration just created in Admin Console>
config:propset <booleanFieldName> 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

        

[jira] [Updated] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

Posted by "Hugh Rodgers (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hugh Rodgers updated KARAF-1560:
--------------------------------

    Attachment: metatype.xml
                karaf_log.png
                karaf_config_propset.png
                demo_validation.png
    
> 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é
>            Priority: Minor
>             Fix For: 2.2.9, 2.3.0, 3.0.0.RC1, 3.0.0
>
>         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 <PID of configuration just created in Admin Console>
> config:propset <booleanFieldName> 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

       

[jira] [Updated] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated KARAF-1560:
----------------------------------------

    Fix Version/s: 3.0.0
                   3.0.0.RC1
                   2.3.0
                   2.2.8
         Assignee: Jean-Baptiste Onofré
    
> 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é
>            Priority: Minor
>             Fix For: 2.2.8, 2.3.0, 3.0.0.RC1, 3.0.0
>
>
> 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 <PID of configuration just created in Admin Console>
> config:propset <booleanFieldName> 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

       

[jira] [Updated] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated KARAF-1560:
----------------------------------------

    Fix Version/s:     (was: 2.3.0)
                   2.3.1
    
> 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é
>            Priority: Minor
>             Fix For: 2.2.9, 2.3.1, 3.0.0.RC1, 3.0.0
>
>         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 <PID of configuration just created in Admin Console>
> config:propset <booleanFieldName> 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

       

[jira] [Commented] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

Posted by "Hugh Rodgers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397576#comment-13397576 ] 

Hugh Rodgers commented on KARAF-1560:
-------------------------------------

I have attached a screenshot of a configuration popup that has a checkbox in it. This popup is created by the OSGI-INF/metattype/metatype.xml file that is included in my bundle (I have attached this file too). I also attached screenshots of my Karaf command line console showing the config:edit command and the error I get when I do config:update after trying to do a propset on the boolean (checkbox) field. And a screenshot of the karaf log file in data/log that shows the stack trace.

Since I opened this ticket I have upgraded to Karaf v2.2.7 (which these screenshots used) and I still have the issue.
                
> 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é
>            Priority: Minor
>             Fix For: 2.2.9, 2.3.0, 3.0.0.RC1, 3.0.0
>
>
> 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 <PID of configuration just created in Admin Console>
> config:propset <booleanFieldName> 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

       

[jira] [Updated] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated KARAF-1560:
----------------------------------------

    Fix Version/s:     (was: 3.0.0.RC1)
                       (was: 2.2.9)
                   2.2.10
    
> 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é
>            Priority: Minor
>             Fix For: 2.2.10, 2.3.1, 3.0.0
>
>         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 <PID of configuration just created in Admin Console>
> config:propset <booleanFieldName> 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

       

[jira] [Commented] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397579#comment-13397579 ] 

Jean-Baptiste Onofré commented on KARAF-1560:
---------------------------------------------

Thanks, it's helpful to really understand the issue. Let me try to reproduce.
                
> 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é
>            Priority: Minor
>             Fix For: 2.2.9, 2.3.0, 3.0.0.RC1, 3.0.0
>
>         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 <PID of configuration just created in Admin Console>
> config:propset <booleanFieldName> 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

       

[jira] [Commented] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397369#comment-13397369 ] 

Jean-Baptiste Onofré commented on KARAF-1560:
---------------------------------------------

Which webconsole are you talking about ?

If you talk about webconsole installed using feature:install webconsole, you have a textbox to edit a configuration (I don't see any checkboxes in the configuration edit tab).

Could you attach a couple of screenshots ?
                
> 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é
>            Priority: Minor
>             Fix For: 2.2.9, 2.3.0, 3.0.0.RC1, 3.0.0
>
>
> 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 <PID of configuration just created in Admin Console>
> config:propset <booleanFieldName> 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

       

[jira] [Updated] (KARAF-1560) config:update throws ClassCastException when used on a Configuration with boolean fields created in the web console

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated KARAF-1560:
----------------------------------------

    Fix Version/s:     (was: 2.2.8)
                   2.2.9
    
> 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é
>            Priority: Minor
>             Fix For: 2.2.9, 2.3.0, 3.0.0.RC1, 3.0.0
>
>
> 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 <PID of configuration just created in Admin Console>
> config:propset <booleanFieldName> 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