Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3677

dsconfig batchfilepath option throwing NoSuchElementException

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Not a defect
    • Affects Version/s: 3.5.1
    • Fix Version/s: Not applicable
    • Component/s: tools
    • Labels:
    • Environment:
      CentOS 6.5, java 1.7.0_45

      Description

      When trying to use the batchfilepath option to dsconfig, the command exits with a Java exception. When I pass the exact same parameters in using --batch on standard input, the command completes successfully.

      [mjc@centos1 mmdj_files]$ cat dsconfig_batch-part
      set-log-publisher-prop \
      --publisher-name File-Based\ Access\ Logger \
      --set rotation-policy:Fixed\ Time\ Rotation\ Policy \
      --set log-format:combined
      set-log-publisher-prop \
      --publisher-name File-Based\ Error\ Logger \
      --set rotation-policy:Fixed\ Time\ Rotation\ Policy

      [mjc@centos1 mmdj_files]$ sudo /opt/mm3/opendj/bin/dsconfig --port 7444 --hostname localhost --bindDN "cn=directory manager" --bindPassword="dirmgr1234" --no-prompt --trustAll --batchFilePath=/var/tmp/mmdj_files/dsconfig_batch-part
      Exception in thread "main" java.util.NoSuchElementException
      at java.util.ArrayList$Itr.next(ArrayList.java:834)
      at org.forgerock.opendj.config.dsconfig.DSConfig.removeBatchArgs(DSConfig.java:1483)
      at org.forgerock.opendj.config.dsconfig.DSConfig.handleBatch(DSConfig.java:1406)
      at org.forgerock.opendj.config.dsconfig.DSConfig.run(DSConfig.java:1107)
      at org.forgerock.opendj.config.dsconfig.DSConfig.main(DSConfig.java:804)
      at org.forgerock.opendj.config.dsconfig.DSConfig.main(DSConfig.java:771)

      [mjc@centos1 mmdj_files]$ sudo /opt/mm3/opendj/bin/dsconfig --port 7444 --hostname localhost --bindDN "cn=directory manager" --bindPassword="dirmgr1234" --no-prompt --trustAll --batch << END_OF_CMD
      > set-log-publisher-prop \
      > --publisher-name File-Based\ Access\ Logger \
      > --set rotation-policy:Fixed\ Time\ Rotation\ Policy \
      > --set log-format:combined
      > set-log-publisher-prop \
      > --publisher-name File-Based\ Error\ Logger \
      > --set rotation-policy:Fixed\ Time\ Rotation\ Policy
      > END_OF_CMD

      set-log-publisher-prop --publisher-name File-Based##Access##Logger --set
      rotation-policy:Fixed##Time##Rotation##Policy --set log-format:combined

      set-log-publisher-prop --publisher-name File-Based##Error##Logger --set
      rotation-policy:Fixed##Time##Rotation##Policy

        Attachments

          Activity

            People

            • Assignee:
              ludo Ludovic Poitou
              Reporter:
              michaeljconklin Mike Conklin [X] (Inactive)
              Dev Assignee:
              Ludovic Poitou
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: