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

Compatibility with SonarQube 8.0 #3

Closed
Indigo744 opened this issue Dec 21, 2019 · 13 comments
Closed

Compatibility with SonarQube 8.0 #3

Indigo744 opened this issue Dec 21, 2019 · 13 comments

Comments

@Indigo744
Copy link

Hello,

Following #2

Versions used:
SonarQube version : 8.0.0.29455
CKS Slack Notifier version : 2.6.0

The analysis went fine, but no notification is sent to Slack.

In the log, I can only see this related line:

2019.12.12 16:25:13 INFO  ce[AW76sQNp757ywNdbTWkx][c.k.s.s.c.c.AbstractSlackNotifyingComponent] SlackNotifierProp.CONFIG=[[]]
2019.12.12 16:25:13 INFO  ce[AW76sQNp757ywNdbTWkx][c.k.s.s.e.t.SlackPostProjectAnalysisTask] Slack notifier plugin disabled, skipping. Settings are [{CONFIG=, HOOK=, PROXY_IP=, INCLUDE_BRANCH=false, ENABLED=false, USER=SonarQube, PROXY_PORT=8080, PROXY_PROTOCOL=HTTP}; project specific channel config: {}]
2019.12.12 16:25:13 ERROR ce[AW76sQNp757ywNdbTWkx][o.s.c.t.s.ComputationStepExecutor] Execution of listener failed
java.lang.AbstractMethodError: Receiver class com.koant.sonar.slacknotifier.extension.task.SlackPostProjectAnalysisTask does not define or inherit an implementation of the resolved method abstract getDescription()Ljava/lang/String; of interface org.sonar.api.ce.posttask.PostProjectAnalysisTask.
	at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.executeTask(PostProjectAnalysisTasksExecutor.java:124)
	at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:109)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:91)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:63)
	at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:209)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:191)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:158)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:133)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:85)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

It says plugin is disabled even though it is enabled in the configuration:
image

Thank you.

@sleroy
Copy link
Owner

sleroy commented Dec 23, 2019

Please try this beta version of the plugin : https://github.com/sleroy/sonar-slack-notifier-plugin/releases/tag/8.0.0-beta

I did the upgrade but didn't have much time to test in-depth with the SonarQube 8.0 platform.

@Indigo744
Copy link
Author

I just tested it, and it works really well, thank you!

@TxX8N8LN
Copy link

TxX8N8LN commented Jan 2, 2020

Hi,
I am very interested in this plugin.
Thank you for your work.
I use too SonarQube 8.
I tested this Beta version.
But I have the same departure error from @Indigo744 .

2020.01.02 16:59:29 INFO  ce[AW9m-6i__4Ygv9XgmyGV][c.b.s.s.c.c.AbstractSlackNotifyingComponent] SlackNotifierProp.CONFIG=[[]]
2020.01.02 16:59:29 INFO  ce[AW9m-6i__4Ygv9XgmyGV][c.b.s.s.e.t.SlackPostProjectAnalysisTask] Slack notifier plugin disabled, skipping. Settings are [{CONFIG=, HOOK=, PROXY_IP=, INCLUDE_BRANCH=false, ENABLED=false, USER=SonarQube, PROXY_PORT=8080, PROXY_PROTOCOL=HTTP}; project specific channel config: {}]

@Indigo744 did you do another particular action?

FYI, the old plugin work with SonarQube 7.X, in my system

@sleroy
Copy link
Owner

sleroy commented Jan 2, 2020

It seems that your plugin configuration is lost.

The plugin configuration is normally found in the project settings and the administration section.

Please control your settings, if your configuration is still displayed, the plugin may face a regression.

@TxX8N8LN
Copy link

TxX8N8LN commented Jan 3, 2020

In the project, in administration setting -> "Background task" and "show scanner contest", i can see this parameters :

SonarQube plugins:
[...]
  - Sonar Slack Notifier 8.0.0-beta (sonarslacknotifier)
[...]
Global server settings:
  - ckss.channel=qualite-logiciel
  - ckss.enabled=true
  - ckss.hook=#good url
  - ckss.projectconfig=1
  - ckss.projectconfig.1.channel=qualite-logiciel
  - ckss.projectconfig.1.notify=
  - ckss.projectconfig.1.project=*
  - ckss.projectconfig.1.projectHook=
  - ckss.proxy_port=80
  - ckss.user=#good user
[...]

@TxX8N8LN
Copy link

TxX8N8LN commented Jan 7, 2020

Hello, now with Sonarqube 8.1, i have more message, but your plugin don't work in my infra.

But with ; https://github.com/kogitant/sonar-slack-notifier-plugin/releases/download/2.1.2/cks-slack-notifier-2.1.2.jar, work now.

Thx

@jincod
Copy link

jincod commented Jan 8, 2020

Hi @sleroy,

Thank you for your updates

With SQ 8.0 I've got an error:

ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: The plugin [sonarslacknotifier] does not support Java 1.8.0_222
	at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:133)
	at org.sonar.core.platform.PluginLoader.load(PluginLoader.java:66)
	at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:61)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.UnsupportedClassVersionError: com/byoskill/sonar/slacknotifier/SlackNotifierPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:131)
	... 26 more
ERROR: 

@Guimove
Copy link

Guimove commented Mar 27, 2020

For information the beta version of this plugin is well working on Sonarqube 8.2.
We use the official docker image to run it on a kubernetes cluster.

@LiverBlow
Copy link

LiverBlow commented Sep 4, 2020

Has anyone manage to get the beta version to work against sonarqube 8.4? Seem to be getting this error:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project american-flights: The plugin [sonarslacknotifier] does not support Java 1.8.0_242: com/byoskill/sonar/slacknotifier/SlackNotifierPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> [Help 1]

@sleroy
Copy link
Owner

sleroy commented Sep 4, 2020 via email

@arogic
Copy link

arogic commented Dec 4, 2020

Hi,

I am getting the following error using your plugin "sonar-slack-notifier-8.0.0-beta.jar" on SonaQube 8.5 running on Kubernetes.

2020.12.04 14:46:27 ERROR ce[AXYuN-qio90fq41d5bx0][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Execution of task class com.byoskill.sonar.slacknotifier.extension.task.SlackPostProjectAnalysisTask failed java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found

Let me know if you require more information.

Thanks in advance.

@sleroy
Copy link
Owner

sleroy commented Dec 15, 2020

Hi, I haven't tested on SonarQube 8.5.

For the main reason, that SonarQube is embedding the load of ESLint results with their SonarJS plugin since the 7.x and I would recommend to use the defacto feature.

https://jira.sonarsource.com/browse/MMF-1231

@sleroy sleroy closed this as completed Dec 15, 2020
@arogic
Copy link

arogic commented Dec 16, 2020

Hi, I haven't tested on SonarQube 8.5.

For the main reason, that SonarQube is embedding the load of ESLint results with their SonarJS plugin since the 7.x and I would recommend to use the defacto feature.

https://jira.sonarsource.com/browse/MMF-1231

Hi @sleroy, my issues got fixed in the meantime. It was my mistake, because I forgot to add the URL in the Project Hook Field and therefore I got the error. The Plugin works on SonarQube 8.5. Thanks for your help and the Plugin. Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants