kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5507) kafka-run-class.sh doesn't check for empty $CLASSPATH
Date Fri, 23 Jun 2017 12:49:01 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-5507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16060836#comment-16060836
] 

ASF GitHub Bot commented on KAFKA-5507:
---------------------------------------

GitHub user evis opened a pull request:

    https://github.com/apache/kafka/pull/3421

    KAFKA-5507: Check classpath empty in kafka-run-class.sh

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/evis/kafka kafka-run-class-check-classpath

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/3421.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3421
    
----
commit 10b17eed70884a94fc4651f3351ad1f7f79dfdd0
Author: Evgeny Veretennikov <evg.veretennikov@gmail.com>
Date:   2017-06-23T12:46:20Z

    KAFKA-5507: Check classpath empty in kafka-run-class.sh

----


> kafka-run-class.sh doesn't check for empty $CLASSPATH
> -----------------------------------------------------
>
>                 Key: KAFKA-5507
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5507
>             Project: Kafka
>          Issue Type: Bug
>          Components: tools
>    Affects Versions: 0.10.2.1
>         Environment: Linux
>            Reporter: Evgeny Veretennikov
>            Assignee: Evgeny Veretennikov
>            Priority: Minor
>
> Steps to reproduce problem:
> 1. Clone Kafka repo using {{git clone}}.
> 2. Run some Bash-script, which invokes {{kafka-run-class.sh}} (without building project
beforehand).
> For example:
> {{$ ./bin/zookeeper-server-start.sh config/zookeeper.properties}}
> {{Error: Could not find or load main class config.zookeeper.properties}}
> Error is misleading. This happens, because {{kafka-run-class.sh}} tries to run this command:
> {{java ...a lot of JVM options... -cp org.apache.zookeeper.server.quorum.QuorumPeerMain
config/zookeeper.properties}}
> Script doesn't check for empty {{$CLASSPATH}} variable. It's empty, because we didn't
build project.
> {{kafka-run-class.bat}} script for Windows checks for it:
> {{IF ["%CLASSPATH%"] EQU [""] (}}
> 	{{echo Classpath is empty. Please build the project first e.g. by running 'gradlew jarAll'}}
> 	{{EXIT /B 2}}
> {{)}}
> I think, we should add similar check to Bash-script, and show similar error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message