Got sonar-java compilation error, could you please help?

When trying to compile sonar-java to replace default tomcat-embed-jasper version 9.0.100 & got error below by ‘mvn clean install’:

[ERROR] sonar-java-8.11.0.38440/java-checks-test-sources/aws/src/main/java/checks/aws/AwsReusableResourcesInitializedOnceCheckSample.java:[40,34] unreported exception java.sql.SQLException; must be caught or declared to be thrown
[ERROR] sonar-java-8.11.0.38440/java-checks-test-sources/aws/src/main/java/checks/aws/AwsReusableResourcesInitializedOnceCheckSample.java:[47,13] unreported exception java.sql.SQLException; must be caught or declared to be thrown
[ERROR] sonar-java-8.11.0.38440/java-checks-test-sources/aws/src/main/java/checks/aws/AwsReusableResourcesInitializedOnceCheckSample.java:[117,34] unreported exception java.sql.SQLException; must be caught or declared to be thrown
[ERROR] sonar-java-8.11.0.38440/java-checks-test-sources/aws/src/main/java/checks/aws/AwsReusableResourcesInitializedOnceCheckSample.java:[119,13] unreported exception java.sql.SQLException; must be caught or declared to be thrown

The annotation ‘@SneakyThrows’ seems not working as expected. Java version to compile is 23.0.2 by following instruction here: GitHub - SonarSource/sonar-java: ☕ SonarSource Static Analyzer for Java Code Quality and Security

Hi,

I’ve edited your post for the same reason I unlisted your other thread.

 
Ann

hey @ct24p,
Are you trying to get rid of a vulnerable dependency in the analyzer? You should know that we actively track CVEs that affect our dependencies to first qualify them, and then upgrade them promptly.

If you wish to upgrade the plugin and build it yourself, you should be able to do so by upgrading to the latest version of tomcat-embed-core on branch 9.0.x (for instance 9.0.105).

Cheers,

Dorian