Qpid
  1. Qpid
  2. QPID-4881

[Java Broker] new --config-property argument cannot be used with qpid-server.bat (windows)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.22, 0.23
    • Fix Version/s: 0.22
    • Component/s: Java Broker
    • Labels:
      None

      Description

      Trying to use a command such using the new argument fails in the following manner.

      Y:\src\qpid\qpid\java\build>.\bin\qpid-server.bat --initial-config-path Y:\ha_test\config.json --config-property nodenum=5
      Warning: Qpid classpath not set. CLASSPATH set to Y:\src\qpid\qpid\java\build\li
      b\qpid-all.jar;Y:\src\qpid\qpid\java\build\lib\plugins*;Y:\src\qpid\qpid\java\build\lib\opt*
      Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
      Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM -Xmx1024m
      Exception during startup: java.lang.IllegalArgumentException: Configuration property argument is not of the format name=value: nodenum
      java.lang.IllegalArgumentException: Configuration property argument is not of the format name=value: nodenum
      at org.apache.qpid.server.Main.execute(Main.java:226)
      at org.apache.qpid.server.Main.<init>(Main.java:134)
      at org.apache.qpid.server.Main.main(Main.java:125)
      Y:\src\qpid\qpid\java\build>

      It appears to be related to the processing of the argument list by the qpid-server.bat file. It is choking on arguments containing =.

      User can workaround by providing the property values as system properties (e.g via QPID_OPTS: set QPID_OPTS="-Dname=value"), or by invoking the Main class directly without the qpid-server.bat script.

        Activity

        Keith Wall created issue -
        Robbie Gemmell made changes -
        Field Original Value New Value
        Description Trying to use a command such using the new argument fails in the following manner.

        Y:\src\qpid\qpid\java\build>.\bin\qpid-server.bat --initial-config-path Y:\ha_test\config.json --config-property nodenum=5
        Warning: Qpid classpath not set. CLASSPATH set to Y:\src\qpid\qpid\java\build\li
        b\qpid-all.jar;Y:\src\qpid\qpid\java\build\lib\plugins\*;Y:\src\qpid\qpid\java\build\lib\opt\*
        Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
        Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM -Xmx1024m
        Exception during startup: java.lang.IllegalArgumentException: Configuration property argument is not of the format name=value: nodenum
        java.lang.IllegalArgumentException: Configuration property argument is not of the format name=value: nodenum
                at org.apache.qpid.server.Main.execute(Main.java:226)
                at org.apache.qpid.server.Main.<init>(Main.java:134)
                at org.apache.qpid.server.Main.main(Main.java:125)
        Y:\src\qpid\qpid\java\build>

        It appears to be related to the processing of the argument list by the qpid-server.bat file. It is choking on arguments containing =.

        User could workaround by invoking the Main class directly.

        Trying to use a command such using the new argument fails in the following manner.

        Y:\src\qpid\qpid\java\build>.\bin\qpid-server.bat --initial-config-path Y:\ha_test\config.json --config-property nodenum=5
        Warning: Qpid classpath not set. CLASSPATH set to Y:\src\qpid\qpid\java\build\li
        b\qpid-all.jar;Y:\src\qpid\qpid\java\build\lib\plugins\*;Y:\src\qpid\qpid\java\build\lib\opt\*
        Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
        Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM -Xmx1024m
        Exception during startup: java.lang.IllegalArgumentException: Configuration property argument is not of the format name=value: nodenum
        java.lang.IllegalArgumentException: Configuration property argument is not of the format name=value: nodenum
                at org.apache.qpid.server.Main.execute(Main.java:226)
                at org.apache.qpid.server.Main.<init>(Main.java:134)
                at org.apache.qpid.server.Main.main(Main.java:125)
        Y:\src\qpid\qpid\java\build>

        It appears to be related to the processing of the argument list by the qpid-server.bat file. It is choking on arguments containing =.

        User can workaround by providing the property values as system properties (e.g via QPID_OPTS: set QPID_OPTS="-Dname=value"), or by invoking the Main class directly without the qpid-server.bat script.

        Hide
        Alex Rudyy added a comment -

        Attached a diff fixing the issue

        Show
        Alex Rudyy added a comment - Attached a diff fixing the issue
        Alex Rudyy made changes -
        Attachment broket-batch-script-fixes.diff [ 12584520 ]
        Hide
        Alex Rudyy added a comment -

        Committed a fix allowing to pass quoted command line arguments in order to pass equal characters as part of arguments: http://svn.apache.org/r1485859

        Show
        Alex Rudyy added a comment - Committed a fix allowing to pass quoted command line arguments in order to pass equal characters as part of arguments: http://svn.apache.org/r1485859
        Alex Rudyy made changes -
        Assignee Alex Rudyy [ alex.rufous ]
        Alex Rudyy made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Robbie Gemmell made changes -
        Summary New --config-property argument cannot be used with qpid-server.bat (windows) [Java Broker] new --config-property argument cannot be used with qpid-server.bat (windows)
        Hide
        Robbie Gemmell added a comment -

        Updated docs/help to use quotes for the argument, as will be required in Windows when using qpid-server.bat: http://svn.apache.org/r1486017

        Show
        Robbie Gemmell added a comment - Updated docs/help to use quotes for the argument, as will be required in Windows when using qpid-server.bat: http://svn.apache.org/r1486017
        Hide
        Justin Ross added a comment -

        Reviewed by Robbie. Approved for 0.22.

        Show
        Justin Ross added a comment - Reviewed by Robbie. Approved for 0.22.
        Hide
        Alex Rudyy added a comment -

        The batch and documentation/help fixes (r1485859, r1486017) are merged into 0.22 branch in revisions http://svn.apache.org/r1486029 and http://svn.apache.org/r1486031 accordingly.

        Show
        Alex Rudyy added a comment - The batch and documentation/help fixes (r1485859, r1486017) are merged into 0.22 branch in revisions http://svn.apache.org/r1486029 and http://svn.apache.org/r1486031 accordingly.
        Alex Rudyy made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 0.22 [ 12324272 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Alex Rudyy
            Reporter:
            Keith Wall
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development