This might be caused by and outdated version of Java, SonarQube now uses Java 8 as default. You might upgrade java or use an older version of SonarQube.
If you're using intellij plugin of sonarqube, you might have to set the JAVA_HOME ambient variable manually.
Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.