Comments (18)
I attempted to add javax.xml.bind:jaxb-api:2.3.0
to the pom dependencies but then I'm hitting some issues that it needs a jaxb implementation.
JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
Therefore I also added javax.activation:activation:1.1
, org.glassfish.jaxb:jaxb-runtime:2.3.0
to the pom with the same exact result... Finally I only kept javax.xml.bind:jaxb-api:2.3.0
in the plugin pom and manually added javax.activation:activation:1.1
, org.glassfish.jaxb:jaxb-runtime:2.3.0
in the sonarqube-7.9/lib/common
directory. This lead to the following error:
javax.xml.bind.DataBindingException: javax.xml.bind.JAXBException: ClassCastException: attempting to cast jar:file:/opt/sonar/sonarqube-7.9/lib/common/jaxb-api-2.3.0.jar!/javax/xml/bind/JAXBContext.class to jar:file:/opt/sonar/sonarqube-7.9/data/web/deploy/plugins/crowd/META-INF/lib/jaxb-api-2.3.0.jar!/javax/xml/bind/JAXBContext.class. Please make sure that you are specifying the proper ClassLoader.
at javax.xml.bind.JAXB._marshal(JAXB.java:589)
at javax.xml.bind.JAXB.marshal(JAXB.java:447)
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)
from sonar-crowd.
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.
from sonar-crowd.
I went even deeper... @frdeboffles you need to include
com.sun.xml.bind
jaxb-impl
2.1
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,
2019.07.03 20:18:39 INFO web[][o.s.p.ProcessEntryPoint] Starting web
2019.07.03 20:18:40 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2019.07.03 20:18:41 ERROR web[][o.s.s.a.EmbeddedTomcat] Fail to start web server
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:427)
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:65)
at org.sonar.server.app.WebServer.start(WebServer.java:52)
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:97)
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81)
at org.sonar.server.app.WebServer.main(WebServer.java:99)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 8 common frames omitted
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 common frames omitted
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
... 12 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 common frames omitted
Caused by: org.apache.tomcat.util.MultiThrowable: null
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:946)
... 8 common frames omitted
I don't want to give up but, I think with all this hacked up stuff. i'm kind of out of options.
from sonar-crowd.
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
from sonar-crowd.
@deepy Is it alright if I move to mark Crowd v2.1.2 as incompatible with SonarQube v7.9 (compatibility ending at v7.8)?
from sonar-crowd.
@colin-mueller-sonarsource that'd be great! Thank you!
from sonar-crowd.
@deepy Done. As always, thanks for maintaining this project! Looking forward to a 7.9 compatible version :)
from sonar-crowd.
Found an ugly way to fix this plugin. I'll create a PR soon.
from sonar-crowd.
from sonar-crowd.
@robmcelvenny Can you paste a bit more of your stacktrace?
from sonar-crowd.
from sonar-crowd.
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 :-(
from sonar-crowd.
Here was the error after fixing the jaxb-api / jaxb-impl / jaxb-core issue:
java.lang.NoClassDefFoundError: com/sun/istack/Pool at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1156) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:165) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:297) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:286) at javax.xml.bind.ContextFinder.find(ContextFinder.java:409) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662) at javax.xml.bind.JAXB$Cache.<init>(JAXB.java:127) at javax.xml.bind.JAXB.getContext(JAXB.java:154) at javax.xml.bind.JAXB._marshal(JAXB.java:578) at javax.xml.bind.JAXB.marshal(JAXB.java:447) 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: com.sun.istack.Pool at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 40 common frames omitted
from sonar-crowd.
@robmcelvenny, @deepy, did some updates to the PR. It should work now.
from sonar-crowd.
Can someone please share jar file having fixed commit 020274b ?
from sonar-crowd.
New crowd plugin is avaialbel for SonarQube 7.9 ?
Please share if available
from sonar-crowd.
The version 2.1.3 is working with Sonarqube 7.9. You can found it here https://github.com/deepy/sonar-crowd/releases
from sonar-crowd.
Thanks, I just installed 2.1.3 and it works again.
from sonar-crowd.
Related Issues (20)
- Periodic synchronization with Crowd HOT 2
- Synchronization issue with specific group names
- Unable to authenticate against Crowd from Sonarqube HOT 3
- Sonarqube startup stop after trying to initializing the Crowd Plugin HOT 7
- User renamed in crowd. Can not log in to sonarqube HOT 1
- The newest release of the Crowd plugin (2.1.2) doesnโt work with SonarQube 7.9 LTS HOT 1
- Sonarqube in Docker HOT 3
- Sonarqube 7.9.1 is not starting up with sonar-crowd 2.1.3 HOT 1
- Create Crowd groups in Sonar automatically after login HOT 1
- Plugin does not start in SQ 8 HOT 6
- sonar-crowd with SSO HOT 1
- licensing question HOT 3
- JAVA 11 on SQ leads to Exeption HOT 4
- Problems with integration to internal crowd directories HOT 5
- compatible problem : SQ 7.9 with plugin 2.1.3 HOT 6
- Move from travis-ci to GitHub Actions
- Remove/change dependency on crowd-integration-client-rest
- Plugin doesn't work with SonarQube 8.9 LTS HOT 2
- Add more automated system tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonar-crowd.