Error during analisys: cannot access com.sun.beans.introspect.PropertyInfo

  • versions used (JDK Project: 1.8.0_131, JDK Sonar: 11.0.2, SonarQube: 9.0.1.46107, Scanner Maven Plugin: 3.7.0.1746)

  • error observed (cannot access com.sun.beans.introspect.PropertyInfo)

  • steps to reproduce (Maven goals: clean install verify sonar:sonar -X)

  • potential workaround: I tried to exclude from analysis but doesn’t work (**/AbstractRepository.java)

  • Error IMG:

  • Error FILE:
    log eclipse.txt (3.6 KB)

Hi,

Welcome to the community!

This is a compile failure, and as such it’s outside the scope of this community.

 
:woman_shrugging:
Ann

Hi Ann! Thanks for your fast reply.
About the code above, it works normally, just on analysis the problem occurs.
Could you give me some tip to investigate?
Thanks.

Hey,

As mentioned by @ganncamp, the problem you are facing does not occur during SonarQube analysis.
Your logs explicitly mention that compilation failed (at the compilation stage of your maven build).

Concretely, it didn’t even reach the phase of the analysis, because it failed before.

As reminder, maven build phases are:

  1. validate
  2. compile
  3. test
  4. package
  5. verify
  6. install
  7. deploy

Note that you are using clean install verify, which seems already strange. verify is supposed to happen before install, and is included anyway when using install, phases piling up.

Also, as mentioned in our documentation, verify or install phases are required to be successful before triggering an analysis with goal sonar:sonar.

You didn’t share any code, just some end-of-build logs.

  • Are you sure you are using the adequate compiler and/or JDK during your maven build?
  • Is mvn clean install alone even succeeding?
  • If it works in your IDE, it does not necessarily means it’s going to work in your build. The configurations might still not match. Are JDKs the same in your IDE and in your build?

Cheers,
Michael