Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web generation fails (could not initialize class fr.cnes.sonar.report.ReportCommandLine) #333

Closed
obriat opened this issue Oct 19, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@obriat
Copy link

obriat commented Oct 19, 2022

Describe the bug

The "Generate a report" web form return an error 500; Comandline works fine

To reproduce

  1. Go to CNES report
  2. Select a project, branch, language, user, ...
  3. Click on 'Generate'
  4. See error "HTTP Status 500 – Internal Server Error"

Expected behavior

Download the reports

Screenshots & log

web.log

2022.10.19 14:58:41 ERROR web[][o.s.s.p.w.RootFilter] Processing of request /api/cnesreport/report?key=***&branch=develop&language=en_US&author=***&token=***&enableDocx=true&enableMd=true&enableXlsx=true&enableCsv=true&enableConf=true&generation=Generate failed
javax.servlet.ServletException: Could not initialize class fr.cnes.sonar.report.ReportCommandLine
...
Caused by: java.lang.NoClassDefFoundError: Could not initialize class fr.cnes.sonar.report.ReportCommandLine

Commande line is ok :

tmp
java -jar /opt/sonarqube/extensions/plugins/sonar-cnes-report-4.1.3.jar -p *** -l en_US-m -f -c -t *****
SonarQube URL: http://localhost:9000
SonarQube online: true
Detected SonarQube version: 9.6.1.59531
[WARNING] This SonarQube version is not supported by this cnesreport version.
[WARNING] For further information, please refer to the compatibility matrix on the project GitHub page.
Report generation: SUCCESS

User environment

  • OS: Debian 11.5
  • SonarQube : 9.6.1 (build 59531)
  • Project version: 4.1.3
  • Java : openjdk 11.0.16 2022-07-19
  • Nginx (reverse proxy with tls) : 1.18.0
@obriat obriat added the bug Something isn't working label Oct 19, 2022
@obriat obriat changed the title Web generation fails (ould not initialize class fr.cnes.sonar.report.ReportCommandLine) Web generation fails (could not initialize class fr.cnes.sonar.report.ReportCommandLine) Oct 19, 2022
@obriat
Copy link
Author

obriat commented Jan 4, 2023

As said on #270 disable and re-enable the plugin solves the problem

@obriat obriat closed this as completed Jan 4, 2023
@obriat obriat reopened this Jan 4, 2023
@obriat
Copy link
Author

obriat commented Jan 4, 2023

Finally, it doesn't work after upgrading to 9.7.1. I get again the error, even after disabling and re-enabling the plugin. It should be another action that fixes it...

@obriat
Copy link
Author

obriat commented Jan 12, 2023

I try to compile it locally: didn't work.
But the very first error message in the log complains about access denied: "java.io.FilePermission" "/opt/sonarqube-9.7.1.62043/.cnesreport/log" "write"
So I created it manually, and it works!
I don't know why the plugin could not create it by his own... (the sonar folder had the correct permissions)

Totally related to #329 (I'm closing this issue)

@obriat obriat closed this as completed Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant