kafka-jira mailing list archives

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

             Summary: 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:
         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

View raw message