If you are using Java 7 and javax.json lib, you do not need to include any external files. But if you are using Java 6 and org.json lib, you must explicitly add the JAR. But it seems to be working in an eclipse. Therefore, I assume that you are using jdk6 with hadoop. If you change it to jdk 7 for hadoop, the problem will be solved.
It works in eclipse because you configured the build path using jdk 7.
If you are using maven, you must specify json lib dependencies in the pom.xml file.
If you are not using maven, just copy your json lib jars to hasoop lib dir and restart hasoop. He will work.
source share