Giter VIP home page Giter VIP logo

Comments (18)

frdeboffles avatar frdeboffles commented on September 6, 2024

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.

zrsm avatar zrsm commented on September 6, 2024

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:

https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/build.gradle

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.

zrsm avatar zrsm commented on September 6, 2024

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.

deepy avatar deepy commented on September 6, 2024

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.

colin-sonarsource avatar colin-sonarsource commented on September 6, 2024

@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.

deepy avatar deepy commented on September 6, 2024

@colin-mueller-sonarsource that'd be great! Thank you!

from sonar-crowd.

colin-sonarsource avatar colin-sonarsource commented on September 6, 2024

@deepy Done. As always, thanks for maintaining this project! Looking forward to a 7.9 compatible version :)

from sonar-crowd.

frdeboffles avatar frdeboffles commented on September 6, 2024

Found an ugly way to fix this plugin. I'll create a PR soon.

from sonar-crowd.

zrsm avatar zrsm commented on September 6, 2024

from sonar-crowd.

frdeboffles avatar frdeboffles commented on September 6, 2024

@robmcelvenny Can you paste a bit more of your stacktrace?

from sonar-crowd.

zrsm avatar zrsm commented on September 6, 2024

from sonar-crowd.

deepy avatar deepy commented on September 6, 2024

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.

zrsm avatar zrsm commented on September 6, 2024

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.

frdeboffles avatar frdeboffles commented on September 6, 2024

@robmcelvenny, @deepy, did some updates to the PR. It should work now.

from sonar-crowd.

shivendrakd avatar shivendrakd commented on September 6, 2024

Can someone please share jar file having fixed commit 020274b ?

from sonar-crowd.

shivendrakd avatar shivendrakd commented on September 6, 2024

New crowd plugin is avaialbel for SonarQube 7.9 ?

Please share if available

from sonar-crowd.

kamal951 avatar kamal951 commented on September 6, 2024

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.

aschepp avatar aschepp commented on September 6, 2024

Thanks, I just installed 2.1.3 and it works again.

from sonar-crowd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.