Pig - Unhandled internal error NoClassDefFoundException Pig - Unhandled internal error NoClassDefFoundException hadoop hadoop

Pig - Unhandled internal error NoClassDefFoundException


At first, you need to tell Pig which jar you are using. See this answer: how to include external jar file using PIG. Configure build path to add it in eclipse is not enough. Eclipse will not help you generate the correct jar.

Secondly, String nb_months_between = "" + Months.monthsBetween(d1,d2); is wrong. You can use int nb_months_between = Months.monthsBetween(d1,d2).getMonths();. If you read the Months.toString, it returns "P" + String.valueOf(getValue()) + "M";. So you can not use this value and want to convert it to a int.


u need this package: org/joda/time/ReadablePartial

can find here: jarfinderdownload the joda-time-1.5.jar. Add to your project, this to should resolve.