I want to parse a json string in our spark Project. I use IDEA. If i run my scala code in IDEA, everything runs well. But When i pack a jar by IDEA+SBT and submit this jar to cluster. Error happpened: Exception in thread "main" Java.lang.NoClassDefFoundError: play/api/libs/json/JSObject
If i not use extra dependency jar, submit to cluster run well.
My pack operation procedure:
File -> Project Structure
-> Artifacts
-> "+"
-> JAR
-> From modules with dependencies
-> select "extract to the target JAR" and set "Main Class"
-> Bulid
-> Build Artifacts
-> Build
screenshot: