I too face this problem often. Sometimes just shortening the command line using IntelliJ Edit configurations would solve the issue like mentioned in above comments.
If the above approach doesn'tdidn't work, then i simply delete the jar files in the build directory of the project and then it used towill work.