cnescatlab / sonar-cnes-report

Generates analysis reports from SonarQube web API.
GNU General Public License v3.0
425 stars 150 forks source link

Sonar-cnes report generate issue #366

Closed anushkaw98 closed 2 months ago

anushkaw98 commented 10 months ago

i am using sonarqube Community Edition Version 9.9.1 in my local windows machine which is working fine, after that i have added sonar-cnes-report-4.2.0.jar to generate report through it,but when i generate report it gives below error,

aw-sonar-report

error i got, aw-report-output

i check the logs as well and found below in web.log

Processing of request /api/cnesreport/report?key=Bmi&branch=main&language=en_US&author=Administrator&token=squ_70b2e9219f5fb975a7f590df8e213059&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

full log is below: web_log.txt

i have download the plugin from this repository,even mentioned this support for Sonarqube new LTS 9.9 support)

really appreciate if anyone can help to resolve this issue,thanks -anushka

SurajS-10 commented 9 months ago

update your Community version to 9.9.2.77730 and then try.

AkshatRamanathan commented 9 months ago

same issue faced here

jdnielss commented 7 months ago

ERROR web[][o.s.s.p.w.RootFilter] Processing of request /sonar/api/cnesreport/report?key=olympus-ms-user-development&branch=main&language=en_US&author=Administrator&token=squ_8d266d829aed90b02f147e4b08f3f2e2340f1e37&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.ExceptionInInitializerError: Exception java.security.AccessControlException: access denied ("java.io.FilePermission" "/opt/sonarqube/sonarqube/.cnesreport/log" "write") [in thread "http-nio-127.0.0.1-9000-exec-3"]

I've sam issue

Topin2001 commented 7 months ago

Hi, I tried to reproduce your error, but I wasn't able to do it, can you please provide me with more information about your infrastructure ? Also, can you try to do it with the latest version of Sonarqube community (for now the 9.9.3 build 79811)

Topin2001 commented 7 months ago

ERROR web[][o.s.s.p.w.RootFilter] Processing of request /sonar/api/cnesreport/report?key=olympus-ms-user-development&branch=main&language=en_US&author=Administrator&token=squ_8d266d829aed90b02f147e4b08f3f2e2340f1e37&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.ExceptionInInitializerError: Exception java.security.AccessControlException: access denied ("java.io.FilePermission" "/opt/sonarqube/sonarqube/.cnesreport/log" "write") [in thread "http-nio-127.0.0.1-9000-exec-3"]

I've sam issue

In your case, I think that the issue is not exactly the same, I think that you have too restrictive authorization given to the folder /opt/sonarqube/sonarqube/.cnesreport/log .

obriat commented 5 months ago

Create the folders /opt/sonarqube/sonarqube/.cnesreport and /opt/sonarqube/sonarqube/.cnesreport/log with write and execute permissions for the sonarqube user, restart sonarqube. It should fix the problem

Related to #329

hannalias commented 5 months ago

Hi there! I have the similar problem with cnes report ( HTTP status 500 - internal server error). I'm using sonarqube community version 10.3.0.82913 and sonar-cnes-report-4.3.0. I will be gratefull for any help. 1

Topin2001 commented 5 months ago

Hi, Because the LTS version 10 of sonarqube is not released, we haven't created the plugin for sonarqube version above 9.9 (current LTS).

Hi there! I have the similar problem with cnes report ( HTTP status 500 - internal server error). I'm using sonarqube community version 10.3.0.82913 and sonar-cnes-report-4.3.0. I will be gratefull for any help. 1

AkshatRamanathan commented 4 months ago

Thanks for the response. I got a temp fix by chaging my java version to an older LTS (17 in mycase) for cnes and but sonarqube was on java 21. thanks again