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

Plugin doesn't work with SonarQube 7.3 #157

Closed
dzmitry-rudnouski opened this issue Aug 22, 2018 · 18 comments
Closed

Plugin doesn't work with SonarQube 7.3 #157

dzmitry-rudnouski opened this issue Aug 22, 2018 · 18 comments
Milestone

Comments

@dzmitry-rudnouski
Copy link

dzmitry-rudnouski commented Aug 22, 2018

Sonar version: 7.3
Checkstyle sonar plugin verson: 4.11

Steps to reproduce or description of problem:

Plugin doesn't work with SonarQube 7.3:
java.lang.IllegalStateException: Fail to load plugin Checkstyle [checkstyle] Caused by: java.lang.NoClassDefFoundError: org/sonar/api/batch/Sensor
Caused by https://jira.sonarsource.com/browse/SONAR-10138.

See also #134

On sonar 7.4

2018.12.25 17:05:39 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin Checkstyle [checkstyle]
        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:748)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/batch/Sensor
        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.plugins.checkstyle.CheckstylePlugin.getExtensions(CheckstylePlugin.java:84)
        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

sonarqube downloads: https://www.sonarqube.org/downloads/ (6.7 is LST, 7.5 latest)
https://hub.docker.com/_/sonarqube/ (6.7-community , 7.5-comminity)

@romani
Copy link
Member

romani commented Sep 6, 2018

sad .... looks like API changes now affecting us.

if smb have a time .... please fill free to provide fix .

hypery2k added a commit to hypery2k/sonar-checkstyle that referenced this issue Sep 16, 2018
@muhlba91
Copy link
Contributor

muhlba91 commented Nov 9, 2018

any information on this issue? can we expect a merge and new version soon? :)

@rnveach
Copy link
Member

rnveach commented Nov 9, 2018

@muhlba91
Some work was going on at #158 but it seems contributor stopped.
Checkstyle team doesn't know sonar very well so we need help fixing and validating.

@muhlba91
Copy link
Contributor

@rnveach I quickly read through the discussion in the linked PR. Can I help in getting it merged so that the integration with SonarQube 7.3 works again?

@romani
Copy link
Member

romani commented Nov 14, 2018

Can I help in getting it merged so that the integration with SonarQube 7.3 works again

Sure!!!
Do not wait providing fix for any issue you see, just make a comment "I am on it" to avoid any unexpected collision with somebody else.
Please be welcome with PR

@rnveach
Copy link
Member

rnveach commented Nov 14, 2018

Other PR has gone stale since Oct. So there shouldn't be any conflict.

@muhlba91
Copy link
Contributor

Great, I already updated dependencies and got a working version locally.
However, due to quite a few API changes, I‘m in the process of fixing some tests.

@muhlba91
Copy link
Contributor

@rnveach please find fix in PR #165 but I need a bit of support with 2 (now ignored) test cases and your CI builds which are failing due to reasons I do not know, unfortunately. I commented in PR.

@charlesfendt
Copy link

2018.11.15 14:25:05 ERROR web[][o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.web.PlatformServletContextListener
org.sonar.api.utils.MessageException: Plugin Checkstyle [checkstyle] requires at least SonarQube 7.2
2018.11.15 14:25:05 ERROR web[][o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file

It seems the build try to start an sonarqube instance with the with compiled version of the plugin... and it failed !
If your patch needs sonarqube 7.2 or more, someone has to change the build script :-/

@muhlba91
Copy link
Contributor

@charlesfendt please see #166

@romani
Copy link
Member

romani commented Nov 30, 2018

sorry for delay in acceptance of this change, I did not forget about this, it is still on my table

romani pushed a commit that referenced this issue Dec 6, 2018
romani added a commit that referenced this issue Dec 16, 2018
@romani romani mentioned this issue Dec 17, 2018
@ediri
Copy link

ediri commented Dec 19, 2018

hi,

looking forward for the fix of the plugin to use with Sonarqube 7.3! Thumbs up for your good work!

@jaune162
Copy link

It's doesn't work with Sonarqube 7.5 too.

@bhalothia
Copy link

It doesn't work for 7.4-community-alpine too.

romani pushed a commit that referenced this issue Jan 14, 2019
@romani romani added this to the 4.17 milestone Jan 14, 2019
@romani
Copy link
Member

romani commented Jan 14, 2019

fix is merged
will be released at the end of January

@romani romani closed this as completed Jan 14, 2019
@YevheniiKokhanevych
Copy link

@romani, when will be available fix version?

@muhlba91
Copy link
Contributor

muhlba91 commented Feb 1, 2019

i'd guess mid of february (see: https://community.sonarsource.com/t/rff-checkstyle-plugin-4-17/6192)

@ediri
Copy link

ediri commented Feb 1, 2019

@YevheniiKokhanevych just download it from the github release page and install manually on the server/container. Its is quicker then waiting. We did and it works like a charme!

tsjensen pushed a commit to checkstyle-addons/sonar-checkstyle that referenced this issue Mar 21, 2019
tsjensen pushed a commit to checkstyle-addons/sonar-checkstyle that referenced this issue Mar 21, 2019
tsjensen pushed a commit to checkstyle-addons/sonar-checkstyle that referenced this issue Mar 21, 2019
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

9 participants