[ 
https://issues.apache.org/jira/browse/DERBY-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485127
 ] 

John H. Embretsen commented on DERBY-2501:
------------------------------------------

I filed this as a bug because error message 2) is caused by a bug in the 
derby_common.bat script.  As mentioned in a post on the derby-user mailing list 
[1], a label "end" is called in the derby_common.bat script when the DERBY_HOME 
environment variable is not set to a valid location (label "noAntHome"), 
although this label ("end") does not exist in this script. The label 
"endcommon" should probably be used instead, which does exist.

The label for reporting invalid DERBY_HOME should be renamed from "noAntHome" 
to "noDerbyHome", as these scripts have nothing to do with Ant.

Error message 3) is caused by the _JAVACMD variable not being set (so the 
scripts execute "" instead of for example "c:\java6\bin\java") if DERBY_HOME is 
invalid.

[1] 
http://www.nabble.com/Re%3A-Setting-the-environment-variables-for-Derby-p9720589.html


> Batch scripts in bin\ report extraneous errors when DERBY_HOME is invalid
> -------------------------------------------------------------------------
>
>                 Key: DERBY-2501
>                 URL: https://issues.apache.org/jira/browse/DERBY-2501
>             Project: Derby
>          Issue Type: Bug
>          Components: Demos/Scripts
>    Affects Versions: 10.2.1.6, 10.2.2.0
>         Environment: Windows
>            Reporter: John H. Embretsen
>         Assigned To: John H. Embretsen
>            Priority: Trivial
>             Fix For: 10.3.0.0
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to