Exception in Sonar Maven Plugin: targetType is null

Must-share information (formatted with Markdown):

  • which versions are you using: last maven plugin version
  • how is SonarQube deployed: zip

Context:

We have this exception during the sonar maven scanner and the given file has not been parsed by the sonar maven plugin.

java.lang.NullPointerException: Cannot invoke “org.eclipse.jdt.internal.compiler.lookup.TypeBinding.getSingleAbstractMethod(org.eclipse.jdt.internal.compiler.lookup.Scope, boolean)” because “targetType” is null

at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.internalIsCompatibleWith(LambdaExpression.java:906)

Problem Details

See the attachment for more information.
sonarqube_bug_1.zip (7.6 KB)

Expected Behavior

No exception is thrown and java class is parsed by plugin correctly.

Hey there!

I see meteoswiss in the logs. You are my weather application of choice. :slight_smile:

Would it be possible for you to share wpe-common/src/main/java/ch/meteoswiss/wpe/common/config/FuncApplication.java? This is probably the only way to know exactly why the parsing is failing.

Hi,

i’m happy to hear that your choice is our weather application :slight_smile:
The java class is already as attachment in the topic. Tell me if you need something more.

1 Like

I’m sorry I missed it! I’ll pass this info onto the right team.

Hi @antonio.ramos.MCH,

I need compilable Java source files to reproduce this issue and investigate more.
Can you please provide me with a minimal, complete reproducer - Java file with all dependencies included and effective pom.xml?

Thank you!

All the best,

Irina