[
https://issues.apache.org/jira/browse/STORM-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14173816#comment-14173816
]
Jungtaek Lim commented on STORM-477:
------------------------------------
If we force users to set JAVA_HOME, we can detect it easily (by checking
existence of java executable file).
But currently storm script uses 'java' (rely on PATH), which can be hard to
detect.
*Nix can run 'which' and check return code. (not 0 indicates error)
But I don't know it can be possible with Windows.
> Incorrectly set JAVA_HOME is not detected
> -----------------------------------------
>
> Key: STORM-477
> URL: https://issues.apache.org/jira/browse/STORM-477
> Project: Apache Storm
> Issue Type: Bug
> Affects Versions: 0.9.2-incubating
> Environment: Rhel6
> Reporter: Paul Poulosky
> Priority: Minor
>
> If JAVA_HOME is incorrectly set in a user's environment when launching storm,
>
> it fails with an error message that is confusing to end users.
> Traceback (most recent call last):
> File "/home/y/bin/storm", line 485, in <module>
> main()
> File "/home/y/bin/storm", line 482, in main
> (COMMANDS.get(COMMAND, unknown_command))(*ARGS)
> File "/home/y/bin/storm", line 225, in listtopos
> extrajars=[USER_CONF_DIR, STORM_DIR + "/bin"])
> File "/home/y/bin/storm", line 153, in exec_storm_class
> ] + jvmopts + [klass] + list(args)
> File "/home/y/bin/storm", line 97, in confvalue
> p = sub.Popen(command, stdout=sub.PIPE)
> File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
> errread, errwrite)
> File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
> raise child_exception
> It would be nice if this were either detected and a proper error message
> printed, or if it warned and fell back to the java found in PATH.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)