Closed bameur closed 8 months ago
I am facing the same issue on SonarQube 10.3 also.
hi,
I quickly analyzed the plugin code, an adaptation is necessary I think. branch feature-sonarqube-10_0-support builds well with version 10.1.073491 and not with version 10.3.082913 according to my test here is the list of errors :
^
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:62: error: cannot find symbol
String branchTypeParam = StringUtils.trimToNull(characteristics.get(CeTaskCharacteristicDto.BRANCH_TYPE_KEY));
^
symbol: variable BRANCH_TYPE_KEY
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:65: error: cannot find symbol
String pullRequest = StringUtils.trimToNull(characteristics.get(CeTaskCharacteristicDto.PULL_REQUEST));
^
symbol: variable PULL_REQUEST
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:68: error: cannot find symbol
CeTaskCharacteristicDto.BRANCH_TYPE_KEY,
^
symbol: variable BRANCH_TYPE_KEY
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:69: error: cannot find symbol
CeTaskCharacteristicDto.PULL_REQUEST));
^
symbol: variable PULL_REQUEST
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:75: error: cannot find symbol
String branch = StringUtils.trimToNull(characteristics.get(CeTaskCharacteristicDto.BRANCH_KEY));
^
symbol: variable BRANCH_KEY
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:99: error: cannot find symbol
.setMainBranchProjectUuid(mainComponentDto.uuid())
^
symbol: method setMainBranchProjectUuid(String)
location: class ComponentDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/pullrequest/ws/binding/action/ProjectWsAction.java:72: error: cannot find symbol
userSession.checkProjectPermission(permission, project);
^
symbol: method checkProjectPermission(String,ProjectDto)
location: variable userSession of type UserSession
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/pullrequest/ws/pullrequest/action/DeleteAction.java:57: error: cannot find symbol
.checkProjectPermission(UserRole.ADMIN, project);
^
symbol: method checkProjectPermission(String,ProjectDto)
location: interface UserSession
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/pullrequest/ws/pullrequest/action/ListAction.java:92: error: cannot find symbol
.stream().collect(MoreCollectors.uniqueIndex(BranchDto::getUuid));
^
symbol: method uniqueIndex(BranchDto::getUuid)
location: class MoreCollectors
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/pullrequest/ws/pullrequest/action/ListAction.java:96: error: cannot find symbol
.collect(MoreCollectors.uniqueIndex(LiveMeasureDto::getComponentUuid));
^
symbol: method uniqueIndex(LiveMeasur[...]tUuid)
location: class MoreCollectors
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/pullrequest/ws/pullrequest/action/ListAction.java:98: error: invalid method reference
.collect(MoreCollectors.uniqueIndex(SnapshotDto::getComponentUuid, s -> DateUtils.formatDateTime(s.getCreatedAt())));
^
cannot find symbol
symbol: method getComponentUuid()
location: class SnapshotDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/pullrequest/ws/pullrequest/action/ListAction.java:108: error: cannot find symbol
if (userSession.hasProjectPermission(UserRole.USER, project) ||
^
symbol: method hasProjectPermission(String,ProjectDto)
location: variable userSession of type UserSession
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/pullrequest/ws/pullrequest/action/ListAction.java:109: error: cannot find symbol
userSession.hasProjectPermission(UserRole.SCAN, project) ||
^
symbol: method hasProjectPermission(String,ProjectDto)
location: variable userSession of type UserSession
13 errors
51 warnings
> Task :compileJava FAILED
FAILURE: Build failed with an exception.```
Hello have you tried this version/branch: Add sonarqube 10.2 support+
thank you for your reply. I'm going to try this :)
gjabouley-invn a small modification is necessary to use the following string type values :
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:62: error: cannot find symbol
String branchTypeParam = StringUtils.trimToNull(characteristics.get(CeTaskCharacteristicDto.BRANCH_TYPE_KEY));
^
symbol: variable BRANCH_TYPE_KEY
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:65: error: cannot find symbol
String pullRequest = StringUtils.trimToNull(characteristics.get(CeTaskCharacteristicDto.PULL_REQUEST));
^
symbol: variable PULL_REQUEST
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:68: error: cannot find symbol
CeTaskCharacteristicDto.BRANCH_TYPE_KEY,
^
symbol: variable BRANCH_TYPE_KEY
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:69: error: cannot find symbol
CeTaskCharacteristicDto.PULL_REQUEST));
^
symbol: variable PULL_REQUEST
location: class CeTaskCharacteristicDto
/home/workspaces/sonarqube-community-branch-plugin/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java:75: error: cannot find symbol
String branch = StringUtils.trimToNull(characteristics.get(CeTaskCharacteristicDto.BRANCH_KEY));
^
symbol: variable BRANCH_KEY
location: class CeTaskCharacteristicDto
5 errors
static values are declared in the class :
the build is ok :
Bests regards
Nice, don't hesitate to propose, over this PR https://github.com/mc1arke/sonarqube-community-branch-plugin/pull/797, a new PR to support 10.3
Sonarqube 10.3 support has been released in v1.18.0 of the plugin
Hello, FYI, the plugin blocks the start of sonar on version 10.3.0 / Oracle JDK 17 I had to re-build the plugin with version 17 of Java for it to work.
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Thanks a lot
the plugin blocks the start of sonar on version 10.3.0 / Oracle JDK 17
Is this the Server or Scanner that fails to start? Are there any details you can provide to help me replicate this as the normal pre-release testing didn't highlight any issues.
the sonar server which does not start. Exactly the [web] component, with no exceptions visible in the logs. I had to analyze the phenomenon by elimination!.
Can you share a bit more information about your environment please? The Docker image for 10.3 uses Java 17 and passed testing so started ok and the required APIs all operated as expected. I'd be surprised that a component would fail to start due to a Java 11 binary compatibility since Java 17 can still read Java 11 class formats.
Hello,
Here is the environment information:
uname -a
Linux xxx.xxx.xx 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
./java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
sonar-application-10.3.0.82913.jar
2024.01.04 10:18:21 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.01.04 10:18:21 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2024.01.04 10:18:21 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.01.04 10:18:21 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.01.04 10:18:34 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /usr/local/Company/sonarqube-10.3.0/temp
2024.01.04 10:18:34 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:42308]
2024.01.04 10:18:34 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/usr/local/Company/sonarqube-10.3.0/elasticsearch]: /usr/local/Company/jdk-17.0.2/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=/usr/local/Company/sonarqube-10.3.0/elasticsearch -Des.path.conf=/usr/local/Company/sonarqube-10.3.0/temp/conf/es -Des.distribution.type=tar -cp /usr/local/Company/sonarqube-10.3.0/elasticsearch/lib/*:/usr/local/Company/sonarqube-10.3.0/elasticsearch/lib/cli-launcher/* org.elasticsearch.launcher.CliToolLauncher
2024.01.04 10:18:34 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.01.04 10:18:43 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2024.01.04 10:18:43 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/usr/local/Company/sonarqube-10.3.0]: /usr/local/Company/jdk-17.0.2/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/usr/local/Company/sonarqube-10.3.0/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -javaagent:/usr/local/Company/sonarqube-10.3.0/extensions/plugins/sonarqube-community-branch-plugin-1.18.0.jar=web -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.3.0.82913.jar:/usr/local/Company/sonarqube-10.3.0/lib/jdbc/postgresql/postgresql-42.6.0.jar org.sonar.server.app.WebServer /usr/local/Company/sonarqube-10.3.0/temp/sq-process4633236224139926142properties
2024.01.04 10:18:55 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.01.04 10:18:55 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2024.01.04 10:18:55 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.01.04 10:18:55 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.01.04 10:19:16 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /usr/local/Company/sonarqube-10.3.0/temp
2024.01.04 10:19:16 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:44094]
2024.01.04 10:19:16 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/usr/local/Company/sonarqube-10.3.0/elasticsearch]: /usr/local/Company/jdk-17.0.2/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=/usr/local/Company/sonarqube-10.3.0/elasticsearch -Des.path.conf=/usr/local/Company/sonarqube-10.3.0/temp/conf/es -Des.distribution.type=tar -cp /usr/local/Company/sonarqube-10.3.0/elasticsearch/lib/*:/usr/local/Company/sonarqube-10.3.0/elasticsearch/lib/cli-launcher/* org.elasticsearch.launcher.CliToolLauncher
2024.01.04 10:19:16 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.01.04 10:19:25 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2024.01.04 10:19:25 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/usr/local/Company/sonarqube-10.3.0]: /usr/local/Company/jdk-17.0.2/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/usr/local/Company/sonarqube-10.3.0/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -javaagent:/usr/local/Company/sonarqube-10.3.0/extensions/plugins/sonarqube-community-branch-plugin-1.18.0.jar=web -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.3.0.82913.jar:/usr/local/Company/sonarqube-10.3.0/lib/jdbc/postgresql/postgresql-42.6.0.jar org.sonar.server.app.WebServer /usr/local/Company/sonarqube-10.3.0/temp/sq-process9851292244059816690properties
2024.01.04 10:19:37 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.01.04 10:19:37 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.01.04 10:19:37 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2024.01.04 10:19:37 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
Thanks in advance
Hi all,
Describe the bug the installation of the plugin (1.14.0) on sonarqube (10.3.0) via the helm chart failed. Can the feature-sonarqube-10_0-support branch be used?
To Reproduce Steps to reproduce the behavior:
Software Versions
Thanks for your help