[JIRA] (JENKINS-58130) JAX-WS ClassNotFoundException javax.xml.ws.WebServiceException

18 views
Skip to first unread message

sverre.moe@gmail.com (JIRA)

unread,
Jun 20, 2019, 5:03:04 PM6/20/19
to jenkinsc...@googlegroups.com
Sverre Moe created an issue
 
Jenkins / Bug JENKINS-58130
JAX-WS ClassNotFoundException javax.xml.ws.WebServiceException
Issue Type: Bug Bug
Assignee: Synopsys SIG
Components: core, coverity-plugin
Created: 2019-06-20 21:02
Labels: java11-compatibility
Priority: Minor Minor
Reporter: Sverre Moe

Running Jenkins 2.181 got an ClassNotFoundException from CoverityPublisher on javax.xml.ws.WebServiceException.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

bmathus+ossjira@cloudbees.com (JIRA)

unread,
Jun 27, 2019, 4:26:03 AM6/27/19
to jenkinsc...@googlegroups.com

bmathus+ossjira@cloudbees.com (JIRA)

unread,
Jun 27, 2019, 4:26:03 AM6/27/19
to jenkinsc...@googlegroups.com

bmathus+ossjira@cloudbees.com (JIRA)

unread,
Jun 27, 2019, 4:26:03 AM6/27/19
to jenkinsc...@googlegroups.com
Baptiste Mathus commented on Bug JENKINS-58130
 
Re: JAX-WS ClassNotFoundException javax.xml.ws.WebServiceException

Sverre Moe FYI this plugin is deprecated since November 2018. Just commenting as a member of the Java 11 team for Jenkins, not maintaining this plugin myself.
https://wiki.jenkins.io/display/JENKINS/Coverity+Plugin

Cheers

sverre.moe@gmail.com (JIRA)

unread,
Jun 27, 2019, 12:43:02 PM6/27/19
to jenkinsc...@googlegroups.com
Sverre Moe commented on Bug JENKINS-58130
 
Re: JAX-WS ClassNotFoundException javax.xml.ws.WebServiceException

Thanks. I wasn't aware of that. I guess then this is a no issue. Will try the new plugin and see if it is running fine with Java 11.

sverre.moe@gmail.com (JIRA)

unread,
Jun 27, 2019, 12:48:02 PM6/27/19
to jenkinsc...@googlegroups.com
 
Re: JAX-WS ClassNotFoundException javax.xml.ws.WebServiceException

It would seem the new Coverity Plugin has similar shortcomings running on Jenkins with Java 11.

1) Error injecting constructor, java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceException
at com.synopsys.integration.jenkins.coverity.extensions.wrap.CoverityEnvironmentWrapper$DescriptorImpl.<init>(CoverityEnvironmen
tWrapper.java:169)

sverre.moe@gmail.com (JIRA)

unread,
Jun 27, 2019, 12:50:02 PM6/27/19
to jenkinsc...@googlegroups.com
 
Re: JAX-WS ClassNotFoundException javax.xml.ws.WebServiceException

I changed the component to synopsys-coverity-plugin.

sverre.moe@gmail.com (JIRA)

unread,
Jun 27, 2019, 12:50:02 PM6/27/19
to jenkinsc...@googlegroups.com

sverre.moe@gmail.com (JIRA)

unread,
Jun 27, 2019, 12:50:03 PM6/27/19
to jenkinsc...@googlegroups.com
Sverre Moe updated an issue
Change By: Sverre Moe
Component/s: synopsys-coverity-plugin

rotte@synopsys.com (JIRA)

unread,
Nov 6, 2019, 1:28:04 PM11/6/19
to jenkinsc...@googlegroups.com
Richard Otte commented on Bug JENKINS-58130
 
Re: JAX-WS ClassNotFoundException javax.xml.ws.WebServiceException

Replying on behalf of Synopsys (as the developer of the Synopsys Coverity plugin),
Investigating this extensively, it would appear that the root of this exception is a fundamental problem in Jenkins or JAX-WS. Briefly, JAX-WS has a ServiceLoaderUtil class shared among the SAAJ, JAXB, and JAXWS libraries to invoke java's ServiceLoader and get implementation classes, but it only ever invokes ServiceLoader.load(Class spiClass), the method that tries to load the class from the current thread's context ClassLoader.

When the exception mentioned by Sverre occurs, the thread that is executing the Synopsys Coverity plugin code does not have the dynamic plugin ClassLoader as it's context ClassLoader-- instead it has the Jenkins WAR ClassLoader, which does not contain any of the JAX-WS classes.

It appears that either:

  • JAX-WS has a bug and should be patched to not rely on the thread context ClassLoader, for example by also checking the spi class's ClassLoader
  • Jenkins has a bug and should be patched ensuring that threads executing plugin code always have a context ClassLoader that is the dynamic plugin ClassLoader

In either case, does the Jenkins team have any suggestions for how to work around this problem? I admit I'm fairly new to the Jenkins Jira and I'm not quite sure who to tag.

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

rotte@synopsys.com (JIRA)

unread,
Nov 6, 2019, 1:33:05 PM11/6/19
to jenkinsc...@googlegroups.com
Replying on behalf of Synopsys (as the developer of the Synopsys Coverity plugin),
Investigating this extensively, it would appear that the root of this exception is a fundamental problem in Jenkins or JAX-WS. Briefly, JAX-WS has a ServiceLoaderUtil class shared among the SAAJ, JAXB, and JAXWS libraries to invoke java's ServiceLoader and get implementation classes, but it only ever invokes ServiceLoader.load(Class spiClass), the method that tries to load the class from the current thread's context ClassLoader.

When the exception mentioned by Sverre occurs, the thread that is executing the Synopsys Coverity plugin code does not have the dynamic plugin ClassLoader as it's context ClassLoader-- instead it has the Jenkins WAR ClassLoader, which does not contain any of the JAX-WS classes.

It appears that either:
* JAX-WS has a bug and should be patched to not rely on the thread context ClassLoader, for example by also checking the spi class's ClassLoader
* Jenkins has a bug and should be patched ensuring that threads executing plugin code always have a context ClassLoader that is the dynamic plugin ClassLoader


In either case, does the Jenkins team have any suggestions for how to work around this problem? I admit I'm fairly new to the Jenkins Jira and I'm not quite sure who to tag.


Edit: As context, my investigation was conducted while providing the missing classes as dependencies to the Synopsys Coverity plugin. I can provide a link to the branch on GitHub if further investigation is needed on the Jenkins side of things to see what I see.

rotte@synopsys.com (JIRA)

unread,
Nov 6, 2019, 1:33:05 PM11/6/19
to jenkinsc...@googlegroups.com
Richard Otte edited a comment on Bug JENKINS-58130
Replying on behalf of Synopsys (as the developer of the Synopsys Coverity plugin),
Investigating this extensively, it would appear that the root of this exception is a fundamental problem in Jenkins or JAX-WS. Briefly, JAX-WS has a ServiceLoaderUtil class shared among the SAAJ, JAXB, and JAXWS libraries to invoke java's ServiceLoader and get implementation classes, but it only ever invokes ServiceLoader.load(Class spiClass), the method that tries to load the class from the current thread's context ClassLoader.

When the exception mentioned by Sverre occurs, the thread that is executing the Synopsys Coverity plugin code does not have the dynamic plugin ClassLoader as it's context ClassLoader-- instead it has the Jenkins WAR ClassLoader, which does not contain any of the JAX-WS classes.

It appears that either:
* JAX-WS has a bug and should be patched to not rely on the thread context ClassLoader, for example by also checking the spi class's ClassLoader
* Jenkins has a bug and should be patched ensuring that threads executing plugin code always have a context ClassLoader that is the dynamic plugin ClassLoader

In either case, does the Jenkins team have any suggestions for how to work around this problem? I admit I'm fairly new to the Jenkins Jira and I'm not quite sure who to tag.

Edit: As context, my investigation was conducted while providing the missing JAX-WS classes as jar dependencies to the Synopsys Coverity plugin. I can provide a link to the branch on GitHub if further investigation is needed on the Jenkins side of things to see what I see.
Reply all
Reply to author
Forward
0 new messages