error: pig bin hadoop apache


neils-MacBook-Pro:~ neil$ pig
Exception in thread "main" java.lang.NoClassDefFoundError: Energy/code/co-occurrence/Twitter
Caused by: java.lang.ClassNotFoundException:
	at Method)
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(


In my case it seemed to be caused by complicated path to pig:

/Users/neil/Documents/neil/Research/Twitter\ Energy/code/co-occurrence/Twitter\ Co-Occurrence\ Pig/var/pig/pig-0.8.0

It started working after changing to a simpler path


Make sure to set appropriate variables e.g.:

export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=/Users/neil/tmp/pig/bin:$PATH
export PIG_HOME=/Users/neil/tmp/pig:$PATH

keywords: osx pig hadoop map reduce mac local grant mapreduce map reduce

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *