Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2501

Batch scripts in bin\ report extraneous errors when DERBY_HOME is invalid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 10.2.1.6, 10.2.2.0
    • 10.3.1.4
    • Demos/Scripts
    • None
    • Windows
    • Normal

    Description

      If DERBY_HOME is set to an invalid location (for example a directory that does not contain lib\derby.jar), most .bat scripts in the bin directory (the ones that call derby_common.bat) report three distinct error messages, of which only one is of value to the user.

      Reproduction:

      C:\Derby_10\db-derby-10.2.2.0-bin>set DERBY_HOME=c:\temp

      C:\Derby_10\db-derby-10.2.2.0-bin>echo %DERBY_HOME%
      c:\temp

      C:\Derby_10\db-derby-10.2.2.0-bin>bin\sysinfo
      DERBY_HOME is set incorrectly or derby.jar could not be located. Please set DERBY_HOME.
      The system cannot find the batch label specified - end
      '""' is not recognized as an internal or external command,
      operable program or batch file.

      The distinct error messages are:

      1) DERBY_HOME is set incorrectly or derby.jar could not be located. Please set DERBY_HOME.

      2) The system cannot find the batch label specified - end

      3) '""' is not recognized as an internal or external command, operable program or batch file.

      Only 1) is relevant for the user, and should ideally be the only one displayed.

      Attachments

        1. derby-2501-check-javacmd.diff
          3 kB
          Samuel Andrew McIntyre
        2. d2501_v2.diff
          0.8 kB
          John Embretsen
        3. d2501_v1.diff
          0.6 kB
          John Embretsen

        Issue Links

          Activity

            People

              johnemb John Embretsen
              johnemb John Embretsen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: