Karaf
  1. Karaf
  2. KARAF-820

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.2.3, 3.0.0
    • Component/s: karaf-core
    • Labels:
      None
    • Environment:

      Karaf running on Windows

      Description

      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).

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          2d 22h 51m 1 Andreas Pieber 25/Aug/11 11:24
          Gavin made changes -
          Link This issue is depended upon by KARAF-828 [ KARAF-828 ]
          Gavin made changes -
          Link This issue blocks KARAF-828 [ KARAF-828 ]
          Andreas Pieber made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 2.2.3 [ 12316685 ]
          Fix Version/s 3.0.0 [ 12316040 ]
          Resolution Fixed [ 1 ]
          Hide
          Andreas Pieber added a comment -

          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

          Show
          Andreas Pieber added a comment - 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
          Hide
          Andreas Pieber added a comment -

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

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

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

          Show
          Andreas Pieber added a comment - OK, adding %9 is really the fix. Using it also allows to use e.g. .\bin\client.bat -a 8101 -h localhost -u karaf -p karaf "osgi:list -t 0 | grep Karaf" I'll push the changes; thank you very much for the report!
          Hide
          Andreas Pieber added a comment -

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

          Show
          Andreas Pieber added a comment - I'll kick up the VM; let's see if I can fix the problem
          Andreas Pieber made changes -
          Assignee Andreas Pieber [ pieber ]
          Jean-Baptiste Onofré made changes -
          Field Original Value New Value
          Link This issue blocks KARAF-828 [ KARAF-828 ]
          Jürgen Kindler created issue -

            People

            • Assignee:
              Andreas Pieber
              Reporter:
              Jürgen Kindler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development