Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5507

kafka-run-class.sh doesn't check for empty $CLASSPATH

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.2.1
    • Fix Version/s: 1.0.0
    • Component/s: tools
    • Labels:
      None
    • Environment:
      Linux

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                evis Evgeny Veretennikov
                Reporter:
                evis Evgeny Veretennikov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: