Details
Description
If you go to the flume/bin directory and run ./flume shell, or ./flume node, or any other command, it will fail with a ClassNotFound exception.
Steps to reproduce:
1. Check out flume
2. Cd to flume/bin directory
3. Run ./flume shell or ./flume node
Expected:
It runs
Actual:
java.lang.ClassNotFoundException
The problem is in the shell script. Jon helped me debug it, and here's the patch:
— a/bin/flume
+++ b/bin/flume
@@ -43,6 +43,13 @@ function usage {
}
CMDPATH=`dirname $0`
+
+# This is to make CMDPATH correct if you go to the bin directory
+# and run ./flume <command>.
+pushd $CMDPATH
+CMDPATH=`pwd`
+popd
+
- name of path
CMDPATH=`dirname $CMDPATH`
@@ -78,8 +85,6 @@ function append_jars_onto_classpath() {
- name of script
BINPATH=`dirname $0`- name of path
-CMDPATH=`dirname $BINPATH`
- name of path
if [ -f "${BINPATH}/flume-env.sh" ]; then
source "$BINPATH/flume-env.sh"
Attachments
Issue Links
- duplicates
-
FLUME-46 flume script in CDH3b2 tar archive fails with NoClassDefFoundError
- Closed