You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jürgen Kindler (JIRA)" <ji...@apache.org> on 2011/08/22 14:33:29 UTC

[jira] [Created] (KARAF-820) Karaf client.bat swallows commands to be passed to the Karaf instance

Karaf client.bat swallows commands to be passed to the Karaf instance
---------------------------------------------------------------------

                 Key: KARAF-820
                 URL: https://issues.apache.org/jira/browse/KARAF-820
             Project: Karaf
          Issue Type: Bug
          Components: karaf-core
    Affects Versions: 2.2.2
         Environment: Karaf running on Windows
            Reporter: Jürgen Kindler


The Karaf client.bat will not send any commands to a Karaf instance when using all options.

.\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list
Simply opens a console, but does not list the bundles.

The reason can be found near the bottom of the script:
:EXECUTE
   if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
   if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8   

Obviously the command "osgi:list" in ".\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list" is argument no. 9 (!)

I have no idea what the %SHIFT% variable is needed for, but if not needed I would remove the code above and change it to:
:EXECUTE
   SET ARGS=%*

With that, it is possible to get a bundle list (and other Karaf console commands that require additional arguments). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (KARAF-820) Karaf client.bat swallows commands to be passed to the Karaf instance

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

Andreas Pieber commented on KARAF-820:
--------------------------------------

OK, adding %9 is really the fix. Using it also allows to use e.g.

{code}
.\bin\client.bat -a 8101 -h localhost -u karaf -p karaf "osgi:list -t 0 | grep Karaf"
{code}

I'll push the changes; thank you very much for the report!

> Karaf client.bat swallows commands to be passed to the Karaf instance
> ---------------------------------------------------------------------
>
>                 Key: KARAF-820
>                 URL: https://issues.apache.org/jira/browse/KARAF-820
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Karaf running on Windows
>            Reporter: Jürgen Kindler
>            Assignee: Andreas Pieber
>
> The Karaf client.bat will not send any commands to a Karaf instance when using all options.
> .\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list
> Simply opens a console, but does not list the bundles.
> The reason can be found near the bottom of the script:
> :EXECUTE
>    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
>    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8   
> Obviously the command "osgi:list" in ".\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list" is argument no. 9 (!)
> I have no idea what the %SHIFT% variable is needed for, but if not needed I would remove the code above and change it to:
> :EXECUTE
>    SET ARGS=%*
> With that, it is possible to get a bundle list (and other Karaf console commands that require additional arguments). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (KARAF-820) Karaf client.bat swallows commands to be passed to the Karaf instance

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

Andreas Pieber commented on KARAF-820:
--------------------------------------

I'll kick up the VM; let's see if I can fix the problem

> Karaf client.bat swallows commands to be passed to the Karaf instance
> ---------------------------------------------------------------------
>
>                 Key: KARAF-820
>                 URL: https://issues.apache.org/jira/browse/KARAF-820
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Karaf running on Windows
>            Reporter: Jürgen Kindler
>            Assignee: Andreas Pieber
>
> The Karaf client.bat will not send any commands to a Karaf instance when using all options.
> .\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list
> Simply opens a console, but does not list the bundles.
> The reason can be found near the bottom of the script:
> :EXECUTE
>    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
>    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8   
> Obviously the command "osgi:list" in ".\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list" is argument no. 9 (!)
> I have no idea what the %SHIFT% variable is needed for, but if not needed I would remove the code above and change it to:
> :EXECUTE
>    SET ARGS=%*
> With that, it is possible to get a bundle list (and other Karaf console commands that require additional arguments). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Assigned] (KARAF-820) Karaf client.bat swallows commands to be passed to the Karaf instance

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

Andreas Pieber reassigned KARAF-820:
------------------------------------

    Assignee: Andreas Pieber

> Karaf client.bat swallows commands to be passed to the Karaf instance
> ---------------------------------------------------------------------
>
>                 Key: KARAF-820
>                 URL: https://issues.apache.org/jira/browse/KARAF-820
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Karaf running on Windows
>            Reporter: Jürgen Kindler
>            Assignee: Andreas Pieber
>
> The Karaf client.bat will not send any commands to a Karaf instance when using all options.
> .\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list
> Simply opens a console, but does not list the bundles.
> The reason can be found near the bottom of the script:
> :EXECUTE
>    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
>    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8   
> Obviously the command "osgi:list" in ".\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list" is argument no. 9 (!)
> I have no idea what the %SHIFT% variable is needed for, but if not needed I would remove the code above and change it to:
> :EXECUTE
>    SET ARGS=%*
> With that, it is possible to get a bundle list (and other Karaf console commands that require additional arguments). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Closed] (KARAF-820) Karaf client.bat swallows commands to be passed to the Karaf instance

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

Andreas Pieber closed KARAF-820.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0
                   2.2.3

Committing to https://svn.apache.org/repos/asf/karaf/branches/2.2.x ...
        M       assemblies/apache-karaf/src/main/filtered-resources/bin/client.bat
Committed r1161500

Committing to https://svn.apache.org/repos/asf/karaf/trunk ...
        M       assemblies/apache-karaf/src/main/filtered-resources/bin/client.bat
Committed r1161509


> Karaf client.bat swallows commands to be passed to the Karaf instance
> ---------------------------------------------------------------------
>
>                 Key: KARAF-820
>                 URL: https://issues.apache.org/jira/browse/KARAF-820
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Karaf running on Windows
>            Reporter: Jürgen Kindler
>            Assignee: Andreas Pieber
>             Fix For: 2.2.3, 3.0.0
>
>
> The Karaf client.bat will not send any commands to a Karaf instance when using all options.
> .\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list
> Simply opens a console, but does not list the bundles.
> The reason can be found near the bottom of the script:
> :EXECUTE
>    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
>    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8   
> Obviously the command "osgi:list" in ".\bin\client.bat -a 8101 -h localhost -u karaf -p karaf osgi:list" is argument no. 9 (!)
> I have no idea what the %SHIFT% variable is needed for, but if not needed I would remove the code above and change it to:
> :EXECUTE
>    SET ARGS=%*
> With that, it is possible to get a bundle list (and other Karaf console commands that require additional arguments). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira