I faced the same problem. The problem was with the my java version mismatch. I developed my code in java version 8 and after that compile that by JDK remote 17 and it could not be run. set all java versions in the same version and then run.