I am trying to Consume Sonar API , During file scanning getting below issue , I have tried sonar community but still struggling to fix…Please anyone help me to resolve this issue
Caused by: java.lang.SecurityException: class “org.eclipse.jdt.core.dom.ASTUtils”'s signer information does not match signer information of other classes in the same package
** at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1150)**
** at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:905)**
** at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1014)**
** at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)**
** at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)**
** at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)**
** at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)**
** at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)**
** at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)**
** at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)**
** at org.sonar.java.model.JParser.convert(JParser.java:197)**
** at org.sonar.java.model.JParser.parse(JParser.java:165)**
** at org.sonar.java.model.JParserConfig$FileByFile.parse(JParserConfig.java:268)**
** … 5 more** ```
Hello Colin & Team,
I am currently working to automate sonar issues using Rules https://github.com/SonarSource/sonar-java. In my local, I am not able to do this job,
For example,
I am taking StringToStringCheckTest class, I would like to work without below code
Exception in thread "main" java.lang.AssertionError: Unexpected at [9]
at org.sonar.java.checks.verifier.internal.InternalCheckVerifier.assertMultipleIssues(InternalCheckVerifier.java:412)
Please give me any good solution to automate fix sonar issue using Rule or without Rule,
First of all, when I removed those three lines, the code still compiles successfully (with tests run).
Secondly, I think I understand more what you’re speaking about – while yes, java:s125 is being raised on this code, these comments are actually a part of how the Sonar API runs the tests (it indicates which code is noncompliant and what columns are a part of the issue. Removing the comments will likely cause the tests to get confused and fail.