Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58130

JAX-WS ClassNotFoundException javax.xml.ws.WebServiceException

    Details

    • Similar Issues:

      Description

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

        Attachments

          Activity

          Hide
          batmat Baptiste Mathus added a comment -

          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

          Show
          batmat Baptiste Mathus added a comment - 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
          Hide
          djviking Sverre Moe added a comment -

          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.

          Show
          djviking Sverre Moe added a comment - 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.
          Hide
          djviking Sverre Moe added a comment -

          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)

          Show
          djviking Sverre Moe added a comment - 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)
          Hide
          djviking Sverre Moe added a comment -

          I changed the component to synopsys-coverity-plugin.

          Show
          djviking Sverre Moe added a comment - I changed the component to synopsys-coverity-plugin.
          Hide
          rotte Richard Otte added a comment - - edited

          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.

          Show
          rotte Richard Otte added a comment - - edited 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.

            People

            • Assignee:
              synopsys_sig_jenkins Synopsys SIG
              Reporter:
              djviking Sverre Moe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: