sfeir-open-source / sonar-clover

It provides the ability to feed SonarQube with code coverage data coming from Atlassian Clover
Apache License 2.0
15 stars 25 forks source link

The latest version does not load on SonarQube 7.3 #18

Closed JohannBlais closed 4 years ago

JohannBlais commented 6 years ago

Hello,

The plugin fails to load on SonarQube Developer 7.3 hosted on Windows Server. Here is the error message in the web.log

java.lang.IllegalStateException: Fail to load plugin Clover [clover] at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:82) at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:586) at org.sonar.server.platform.Platform.start(Platform.java:211) at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:185) at org.sonar.server.platform.Platform.access$500(Platform.java:46) at org.sonar.server.platform.Platform$1.lambda$doRun$0(Platform.java:119) at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371) at org.sonar.server.platform.Platform$1.doRun(Platform.java:119) at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: org/sonar/api/batch/Sensor at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) 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.plugins.clover.CloverPlugin.getExtensions(CloverPlugin.java:39) at org.sonar.api.SonarPlugin.define(SonarPlugin.java:51) at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:72) ... 9 common frames omitted Caused by: java.lang.ClassNotFoundException: org.sonar.api.batch.Sensor at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39) at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87) at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76) ... 25 common frames omitted

Kind regards

mlschechter commented 6 years ago

@Tony-Proum,

That's the deprecated class, which is not referenced in my source at all (I just double-checked). Could you please review my pull request and confirm?

Also, I think there are other issues. I'm running the integration tests locally by forcing the version to 7.3 (it defaults to the LTS version). The Groovy plugin is not compatible with 7.3 (https://docs.sonarqube.org/display/PLUG/Plugin+Version+Matrix), and they've removed the XML utilities from 7.3 that were deprecated. There's no impact on this code with respect to the Groovy issue except that we'd have to disable the test for Groovy until it was fixed 😄

My company is using SonarQube 6.7.1, and I've verified that the plugin as coded works with 6.x up to 7.2. Can you please cut a release with those compatibility notes once you confirm the above, and I'll submit another pull request for the 7.3 compatibility?

Thanks!

heruan commented 6 years ago

Any news about this? Unfortunately I've updated to SQ 7.3 without noticing the incompatibility with Clover in the plugin compatibility matrix.

I really hope this will get fixed soon!

Tony-Proum commented 5 years ago

I m trying to get some information about copyrights and license : I've just began the maintainer of this repository from few times and didn't find enought info yet but I'm working on it. After that we sould be able to release a new version of this plugin.

For the moment, you could try the branch provided by @mlschechter

heruan commented 5 years ago

Thank you for the response. What's the license issue blocking support for SQ 7.3?

Tony-Proum commented 5 years ago

I don't know who have to be owner of the copyrights and if I've to update the licenses in order to be compliant with sonarQube policy.

heruan commented 5 years ago

I understand. I really hope you can get that info soon and release a compatible version, as I rely much on this plugin for my coverage data! Thank you!

edgutz commented 5 years ago

is this issue with SQ 7.3 fixed ? We use Clover for many projects and really need it to work with SQ 7.3 Please advise. Thanks.

Tony-Proum commented 5 years ago

We're actively working on some integration prerequisites (need an artifactory account to be able to publish a new version) https://github.com/Tony-Proum/sonar-clover/issues/24

liz-zara commented 5 years ago

Hi @Tony-Proum I really hope to have the new clover version. Im implementing Unit test coverage report for php with Bamboo and SonarQube 7.3 in a Dev Ops implementation journey, this is the only little detail that is missing :(

How long do you estimate that the version will be released?

heruan commented 5 years ago

Still, this plugin doesn't work in SQ 7.3 as of today. Any news?

Tony-Proum commented 5 years ago

Hi, we've just transfert the repository to this new organization, it should take some days to set everything in order to have an continuous integration and else, then we could release a new version

mlschechter commented 5 years ago

Please let me know if you need anything from me. The latest in my pull request is 7.3-compatible, as I've removed the dependencies on the deprecated code.

heruan commented 5 years ago

Thank you @Tony-Proum for the feedback and for the repository transfer, I really hope this plugin can get back to life! It's been 10 months since the PR was issued by @mlschechter but it's still unmerged. Good to know it's a matter of days!

heruan commented 5 years ago

Any update on this? I'm on the verge of deciding if I need to drop Clover since it doesn't work with SonarQube, so having a precise ETA would be crucial to me.

mlschechter commented 5 years ago

@heruan,

You can use the code in my pull request as a short-term solution; it should work with 7.x

heruan commented 5 years ago

@mlschechter Thank you! In fact, I'm already using your code in my local environment and works like a charm 🙂 Unfortunately, I cannot force DevOps to include that in the company's SonarQube as they require the plugin to be available in the marketplace.

mlschechter commented 5 years ago

@Tony-Proum,

Is there a release schedule that you might be able to share? I can try to work in any merge-outs you need to make my pull request ready.

Thanks!

Tony-Proum commented 5 years ago

you can find more information in this PR. https://github.com/sfeir-open-source/sonar-clover/pull/34

armsargis commented 5 years ago

For sonarqube 7.9 you can try to use: https://github.com/armsargis/sonar-clover/tree/sonar-7.9

Tony-Proum commented 5 years ago

PR was merge, we now have to setup the new public artifact repository in order to deploy our new releases

Tony-Proum commented 5 years ago

:tada: The new release as been uploaded on the proper artifact repository, we have now to wait for the sonarSource review to see if the new version is valid to be publish in the sonarQube marketplace. see: https://community.sonarsource.com/t/new-release-clover-plugin-4-0/13639

Tony-Proum commented 4 years ago

:tada: We're done the new version 4.1 loads on latest version of SonarQube and is available through the marketplace !