-
Notifications
You must be signed in to change notification settings - Fork 34
java.lang.NoClassDefFoundError: javax/xml/bind/JAXB #25
Comments
I attempted to add
Therefore I also added
|
I've been working on this for a while. I believe that this issue isn't happening because of sonar-crowd, but because in Java11 JAXB has been completely removed. I've found a number of different issues, but more importantly, the issue here: Shows that there is a dependency for JAXB being included. I have not been able to get this to work yet.. Currently looking for a way to manually install JAXB in the class path... Anyone have any suggestions? It would be nice to raise a PR for this on the Sonarqube side. |
I went even deeper... @frdeboffles you need to include in the sonar-crowd pom.xml file, also download jaxb-impl-2.1 into sonarqube-7.9/lib/common ... make sure that all of the dependencies match in version, otherwise you will get a REFLECTION error. Then after all of that troubleshooting,
I don't want to give up but, I think with all this hacked up stuff. i'm kind of out of options. |
Thank you all for the investigations! I'm currently in the process of moving so I won't be able to look at it this week, if someone has a PR I'll be able to test it on Sunday |
@deepy Is it alright if I move to mark Crowd v2.1.2 as incompatible with SonarQube v7.9 (compatibility ending at v7.8)? |
@colin-mueller-sonarsource that'd be great! Thank you! |
@deepy Done. As always, thanks for maintaining this project! Looking forward to a 7.9 compatible version :) |
Found an ugly way to fix this plugin. I'll create a PR soon. |
Thanks for sending!
|
@robmcelvenny Can you paste a bit more of your stacktrace? |
Didnt realise my personal info was here... deleted
|
Had to recreate my testbed so I didn't have time to investigate further, but the PR is not working for me with sq 7.9 :-( |
Here was the error after fixing the jaxb-api / jaxb-impl / jaxb-core issue:
|
fixes deepy#25 Added javax.xml.bind:jaxb-api:2.3.0, javax.activation:activation:1.1, com.sun.xml.bind:jaxb-core:2.3.0 and org.glassfish.jaxb:jaxb-runtime:2.3.0 dependencies. Forced the thread context loader (use when authenticating) to use the plugin context loader.
@robmcelvenny, @deepy, did some updates to the PR. It should work now. |
Can someone please share jar file having fixed commit 020274b ? |
fixes deepy#25 Added javax.xml.bind:jaxb-api:2.3.0, javax.activation:activation:1.1, com.sun.xml.bind:jaxb-core:2.3.0 and org.glassfish.jaxb:jaxb-runtime:2.3.0 dependencies. Forced the thread ClassLoader to use the class ClassLoader on all public methods in this package. AOP weaving done at compile time by aspectj-maven-plugin.
fixes deepy#25 Added javax.xml.bind:jaxb-api:2.3.0, javax.activation:activation:1.1, com.sun.xml.bind:jaxb-core:2.3.0 and org.glassfish.jaxb:jaxb-runtime:2.3.0 dependencies. Forced the thread ClassLoader to use the class ClassLoader on all public methods in this package. AOP weaving done at compile time by aspectj-maven-plugin. Uses com.nickwongdev:aspectj-maven-plugin:1.12.1 maven plugin to also build using jdk 11.
New crowd plugin is avaialbel for SonarQube 7.9 ? Please share if available |
The version 2.1.3 is working with Sonarqube 7.9. You can found it here https://github.com/deepy/sonar-crowd/releases |
Thanks, I just installed 2.1.3 and it works again. |
I tried to run the Crowd plugin 2.1.2 on Sonarqube 7.9 on OpenJDK 11 and I run into this problem on startup:
2019.07.02 14:41:31 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.NoClassDefFoundError: javax/xml/bind/JAXB
at com.atlassian.crowd.integration.rest.service.RestExecutor.setBody(RestExecutor.java:204)
at com.atlassian.crowd.integration.rest.service.RestExecutor.post(RestExecutor.java:176)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchUsers(RestCrowdClient.java:511)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.testConnection(RestCrowdClient.java:500)
at org.sonar.plugins.crowd.CrowdRealm.init(CrowdRealm.java:97)
at org.sonar.server.user.SecurityRealmFactory.start(SecurityRealmFactory.java:87)
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.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:545)
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.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXB
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
The text was updated successfully, but these errors were encountered: