[JIRA] (JENKINS-59301) Crowd 2 plugin not compatible with JDK11

0 views
Skip to first unread message

jonesbusy@gmail.com (JIRA)

unread,
Sep 10, 2019, 1:51:05 PM9/10/19
to jenkinsc...@googlegroups.com
Valentin Delaye created an issue
 
Jenkins / Bug JENKINS-59301
Crowd 2 plugin not compatible with JDK11
Issue Type: Bug Bug
Assignee: Martin Spielmann
Components: crowd2-plugin
Created: 2019-09-10 17:50
Environment: docker image jenkins/jenkins:2.176.3-jdk11

with java option

-Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory

with following plugins/version

ace-editor:1.1
analysis-model-api:5.3.0
ansicolor:0.6.2
ant:1.10
antisamy-markup-formatter:1.6
apache-httpcomponents-client-4-api:4.5.5-3.0
authentication-tokens:1.3
authorize-project:1.3.0
azure-ad:1.0.0
azure-commons:1.0.4
azure-credentials:1.6.1
azure-keyvault:1.2
azure-vm-agents:1.1.1
basic-branch-build-strategies:1.3.2
bouncycastle-api:2.17
branch-api:2.5.4
build-timeout:1.19
build-token-root:1.5
build-user-vars-plugin:1.5
chatter-notifier:2.1.0
cloud-stats:0.24
cloudbees-bitbucket-branch-source:2.4.6
cloudbees-folder:6.9
command-launcher:1.3
config-file-provider:3.6.2
configuration-as-code:1.29
credentials-binding:1.20
credentials:2.3.0
cron_column:1.4
crowd2:2.0.2
custom-tools-plugin:0.7
display-url-api:2.3.2
docker-commons:1.15
docker-workflow:1.19
durable-task:1.30
email-ext:2.66
extended-choice-parameter:0.78
external-monitor-job:1.7
extra-tool-installers:0.5
file-operations:1.7
git-client:2.8.2
git-server:1.8
git:3.12.0
github-api:1.95
github:1.29.4
gradle:1.33
gravatar:2.1
handlebars:1.1.1
handy-uri-templates-2-api:2.1.7-1.0
hashicorp-vault-plugin:2.5.0
htmlpublisher:1.18
http_request:1.8.23
ivy:2.1
jackson2-api:2.9.9.1
javadoc:1.5
jdk-tool:1.3
job-dsl:1.76
jobConfigHistory:2.23.1
jquery-detached:1.2.1
jquery:1.12.4-1
jsch:0.1.55.1
junit:1.28
kubernetes-cd:2.1.1
kubernetes-credentials:0.4.1
kubernetes:1.18.3
ldap:1.20
locale:1.4
lockable-resources:2.5
logfilesizechecker:1.5
login-theme:1.0
mailer:1.24
mapdb-api:1.0.9.0
matrix-auth:2.4.2
matrix-project:1.14
maven-plugin:3.4
mercurial:2.8
metrics:4.0.2.5
momentjs:1.1.1
next-executions:1.0.12
pam-auth:1.5.1
pipeline-build-step:2.9
pipeline-github-lib:1.0
pipeline-graph-analysis:1.10
pipeline-input-step:2.11
pipeline-milestone-step:1.3.1
pipeline-model-api:1.3.9
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:1.3.9
pipeline-model-extensions:1.3.9
pipeline-rest-api:2.12
pipeline-stage-step:2.3
pipeline-stage-tags-metadata:1.3.9
pipeline-stage-view:2.12
pipeline-utility-steps:2.3.0
plain-credentials:1.5
prometheus:2.0.6
resource-disposer:0.13
scm-api:2.6.3
script-security:1.62
simple-theme-plugin:0.5.1
skip-notifications-trait:1.0.3
sonar:2.9
ssh-agent:1.17
ssh-credentials:1.17.1
ssh-slaves:1.30.1
structs:1.20
subversion:2.12.2
timestamper:1.10
token-macro:2.8
variant:1.3
view-job-filters:2.1.1
violation-comments-to-stash:1.109
warnings-ng:5.3.0
windows-slaves:1.4
workflow-aggregator:2.6
workflow-api:2.36
workflow-basic-steps:2.18
workflow-cps-global-lib:2.15
workflow-cps:2.73
workflow-durable-task-step:2.33
workflow-job:2.34
workflow-multibranch:2.21
workflow-scm-step:2.9
workflow-step-api:2.20
workflow-support:3.3
ws-cleanup:0.37
Priority: Major Major
Reporter: Valentin Delaye

Hi,

I don't know if it's me, but it seems that the Crowd2 plugin is not compatible with JDK11

javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
 - with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:397)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
	at com.atlassian.crowd.integration.rest.util.JAXBContextCache$1.load(JAXBContextCache.java:29)
	at com.atlassian.crowd.integration.rest.util.JAXBContextCache$1.load(JAXBContextCache.java:25)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
	at com.atlassian.crowd.integration.rest.util.JAXBContextCache.getJAXBContext(JAXBContextCache.java:41)
	at com.atlassian.crowd.integration.rest.service.RestExecutor.getUnmarshaller(RestExecutor.java:414)
	at com.atlassian.crowd.integration.rest.service.RestExecutor.access$000(RestExecutor.java:68)
	at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:489)
	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.getGroup(RestCrowdClient.java:337)
	at de.theit.jenkins.crowd.CrowdConfigurationService.getGroup(CrowdConfigurationService.java:519)
	at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupActive(CrowdConfigurationService.java:310)
	at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupMember(CrowdConfigurationService.java:675)
	at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupMember(CrowdConfigurationService.java:257)
	at de.theit.jenkins.crowd.CrowdAuthenticationManager.authenticate(CrowdAuthenticationManager.java:114)
	at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:74)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:252)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1701)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1668)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:502)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:565)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
	at javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276)
	... 68 more

Exact same config work for jenkins/jenkins:2.176.3

Regards,

Valentin

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jonesbusy@gmail.com (JIRA)

unread,
Sep 10, 2019, 1:59:03 PM9/10/19
to jenkinsc...@googlegroups.com
Valentin Delaye updated an issue
Change By: Valentin Delaye
Labels: java11-compatibility

jonesbusy@gmail.com (JIRA)

unread,
Sep 10, 2019, 2:02:01 PM9/10/19
to jenkinsc...@googlegroups.com
Valentin Delaye updated an issue
Change By: Valentin Delaye
Attachment: Screenshot 2019-09-10 at 19.46.24.png

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Sep 11, 2019, 4:27:03 AM9/11/19
to jenkinsc...@googlegroups.com

bmathus+ossjira@cloudbees.com (JIRA)

unread,
Sep 13, 2019, 6:08:02 AM9/13/19
to jenkinsc...@googlegroups.com

Valentin Delaye checking your plugin list, something seems wrong: you should have the jaxb plugin automatically installed when using JDK11.

Could you please:

  • check if your issue goes away by manually installing the JAXB plugin (https://plugins.jenkins.io/jaxb)
  • see if you can provide a sufficiently isolated reproduction case for this issue?

Thank you

jonesbusy@gmail.com (JIRA)

unread,
Sep 13, 2019, 7:53:17 AM9/13/19
to jenkinsc...@googlegroups.com

Hi,

Problem remains the same if the JAXB plugin is installed manually. It seems it's the only plugin causing this issue on our current deployment (we can see that all the job runs, but not possible to login into the instance.

I've also found someone having the same issue : https://github.com/jenkinsci/jaxb-plugin/issues/7 (it was posted on the jaxb-plugin), but the stacktrace is the same. Related to the Crowd2 plugin.

For the moment I don't have, and easy reproducible environment (we have all our infra deployed on K8S and helm).

Will keep you updated if I'm able to reproduce it locally.

Regards,

jonesbusy@gmail.com (JIRA)

unread,
Sep 13, 2019, 8:00:07 AM9/13/19
to jenkinsc...@googlegroups.com
Valentin Delaye updated an issue
Change By: Valentin Delaye
Attachment: crowd_jaxb.png

jonesbusy@gmail.com (JIRA)

unread,
Sep 13, 2019, 8:00:08 AM9/13/19
to jenkinsc...@googlegroups.com
Valentin Delaye updated an issue
Change By: Valentin Delaye
Attachment: crowd2_2.png
Attachment: crowd2.png

jonesbusy@gmail.com (JIRA)

unread,
Sep 13, 2019, 8:00:08 AM9/13/19
to jenkinsc...@googlegroups.com
 
Re: Crowd 2 plugin not compatible with JDK11

Hi again Baptiste Mathus

Ok so in fact it was very very easy to reproduce locally...

1) docker run -p 8080:8080 jenkins/jenkins:2.176.3-jdk11
2) don't install any plugin at startup
3) Just install the crowd2 plugin (it correctly fetch dependency)
4) Enter just a fake crowd config and test to validate

We can see the error is related to JAX-B.

Thanks

jonesbusy@gmail.com (JIRA)

unread,
Sep 13, 2019, 8:04:03 AM9/13/19
to jenkinsc...@googlegroups.com

jonesbusy@gmail.com (JIRA)

unread,
Sep 13, 2019, 8:14:02 AM9/13/19
to jenkinsc...@googlegroups.com
 
Re: Crowd 2 plugin not compatible with JDK11

Also same issue by forcing the JAXB implementation

docker run -p 8080:8080 -e JAVA_OPTS=-Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory jenkins/jenkins:2.176.3-jdk11

jonesbusy@gmail.com (JIRA)

unread,
Sep 13, 2019, 8:14:03 AM9/13/19
to jenkinsc...@googlegroups.com
Valentin Delaye updated an issue
Change By: Valentin Delaye
Attachment: crowd_java_opt.png

adrien.lecharpentier@gmail.com (JIRA)

unread,
Sep 17, 2019, 6:22:02 AM9/17/19
to jenkinsc...@googlegroups.com
Adrien Lecharpentier commented on Bug JENKINS-59301
 
Re: Crowd 2 plugin not compatible with JDK11

The good news is that we can totally reproduce this with mvn -Djenkins.version=2.176.3 hpi:run.

I'm trying to see how I can fix this with a minimum of changes.

adrien.lecharpentier@gmail.com (JIRA)

unread,
Sep 17, 2019, 7:04:05 AM9/17/19
to jenkinsc...@googlegroups.com

So, I have a problem. The context is loaded from Crowd Integration sources, which I have no access. This got me into looking into the library license, and I'm not sure if we are supposed to use it.

Opening a INFRA ticket to discuss this.

mail@martinspielmann.de (JIRA)

unread,
Sep 18, 2019, 9:22:03 AM9/18/19
to jenkinsc...@googlegroups.com

adrien.lecharpentier@gmail.com (JIRA)

unread,
Sep 18, 2019, 9:44:05 AM9/18/19
to jenkinsc...@googlegroups.com

Martin Spielmann thank you for that! I wasn't really done with it, as I wanted to add a unit-test which would show the bug. But I guess we wouldn't have seen the problem in the PR (because of the Jenkinsfile) and it would have meant that master branch would have been broken..

I'll create another PR for the test, so that we can all work on trying to solve this. However, from what I have so far is that, as Crowd Integration library is calling JAXB, I cannot fix it on the plugin. (This is the way I managed to fix this in other plugins in the past)

rsandell@cloudbees.com (JIRA)

unread,
Sep 24, 2019, 4:25:02 AM9/24/19
to jenkinsc...@googlegroups.com
rsandell updated an issue
 
Change By: rsandell
Labels: java11-compatibility triaged

jonesbusy@gmail.com (JIRA)

unread,
Sep 24, 2019, 10:29:02 AM9/24/19
to jenkinsc...@googlegroups.com
Valentin Delaye commented on Bug JENKINS-59301
 
Re: Crowd 2 plugin not compatible with JDK11

Hi! Thanks for the updates!

Do you think it's something that can be fix "easily" ?

Thanks for the help and confirming the issue.

Regards,

adrien.lecharpentier@gmail.com (JIRA)

unread,
Sep 27, 2019, 4:52:03 AM9/27/19
to jenkinsc...@googlegroups.com

Valentin Delaye sadly, I'm not confident that there is an easy way to fix this. The source code of the libray being hidden (most of it, we can still uncompile it) makes it really difficult for me to have a clear idea.

adrien.lecharpentier@gmail.com (JIRA)

unread,
Sep 27, 2019, 5:13:05 AM9/27/19
to jenkinsc...@googlegroups.com
[~jonesbusy] sadly, I'm not confident that there is an easy way to fix this. The source code of the libray being hidden (most of it, we can still uncompile it) makes it really difficult for me to have a clear idea.

I opened a second PR with a test to show the problem: https://github.com/jenkinsci/crowd2-plugin/pull/37

shrimpcracker89@gmail.com (JIRA)

unread,
Oct 1, 2019, 11:18:10 AM10/1/19
to jenkinsc...@googlegroups.com

Hey Guys,

I saw the discussion going on here and the concerns about hacking the pom due to the licensing using the proprietary library.

 

As it turns out, Atlassian released an open source apache 2.0 licensed alternative to the library that utilizes the REST api namespace on the back end:

https://jira.atlassian.com/browse/CWD-3008

https://bitbucket.org/atlassian/crowd-rest-client

 

I'm unsure how helpful this will be, but I just wanted to shed some light on this alternative library if it at all helps solve the issue at hand.

reneesh.k@gmail.com (JIRA)

unread,
Oct 7, 2019, 12:27:02 PM10/7/19
to jenkinsc...@googlegroups.com

Running into exact same error when integrating crowd with jenkins. Here are my versions

Crowd - 3.4

Jenkins - [ 2.176.2|https://jenkins.io/]

Jenkins JDK - OpenJDK11

msglueck@gmail.com (JIRA)

unread,
Oct 15, 2019, 4:53:06 AM10/15/19
to jenkinsc...@googlegroups.com

I also have the same issue here. Started in refactoring the plugin here: https://github.com/jenkinsci/crowd2-plugin/pull/39

Actually adding the missing functions with the new proposed Crowd REST client (see above) wasn't that hard. Still struggling with the JAXB dependency though. First time I touched a Jenkins plugin, so maybe I'm missing something- 

but have to switch over to other duties ATM  Hope this helps anyways.

st.ferstl@gmail.com (JIRA)

unread,
Feb 27, 2020, 9:28:03 AM2/27/20
to jenkinsc...@googlegroups.com

The plugin works when you add a JAXB-Implementation and its dependencies to JENKINS_HOME/war/WEB-INF/lib . These are the libraries of the implementation that formerly was part of the JDK (jaxb-runtime and its dependencies):

org.glassfish.jaxb:jaxb-runtime:jar:2.3.0
org.glassfish.jaxb:jaxb-core:jar:2.3.0
javax.xml.bind:jaxb-api:jar:2.3.0
org.glassfish.jaxb:txw2:jar:2.3.0 
com.sun.istack:istack-commons-runtime:jar:3.0.5 
org.jvnet.staxex:stax-ex:jar:1.7.8

See also: Using JAXB in Java 9+

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages