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

Performance Signature Plugin: JAXB API is missing with Java 11

      JAXB dependencies seems to be missing on classpath, while using jenkins/jenkins:jdk11:

      hudson.remoting.ProxyException: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
      	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
      	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
      	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      	at java.xml.bind/javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
      	at java.xml.bind/javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
      	at java.xml.bind/javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276)
      Caused: hudson.remoting.ProxyException: 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.internal.bind.v2.ContextFactory]
      	at java.xml.bind/javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278)
      	at java.xml.bind/javax.xml.bind.ContextFinder.find(ContextFinder.java:421)
      	at java.xml.bind/javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
      	at java.xml.bind/javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
      	at retrofit2.converter.jaxb.JaxbConverterFactory.contextForType(JaxbConverterFactory.java:74)
      Caused: hudson.remoting.ProxyException: java.lang.IllegalArgumentException: 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.internal.bind.v2.ContextFactory]
      	at retrofit2.converter.jaxb.JaxbConverterFactory.contextForType(JaxbConverterFactory.java:76)
      	at retrofit2.converter.jaxb.JaxbConverterFactory.responseBodyConverter(JaxbConverterFactory.java:67)
      	at retrofit2.Retrofit.nextResponseBodyConverter(Retrofit.java:330)
      	at retrofit2.Retrofit.responseBodyConverter(Retrofit.java:313)
      	at retrofit2.ServiceMethod$Builder.createResponseConverter(ServiceMethod.java:739)
      Caused: hudson.remoting.ProxyException: java.lang.IllegalArgumentException: Unable to create converter for class de.tsystems.mms.apm.performancesignature.dynatrace.rest.xml.model.LicenseInformation
          for method CustomXMLApi.getServerLicense
      	at retrofit2.ServiceMethod$Builder.methodError(ServiceMethod.java:755)
      	at retrofit2.ServiceMethod$Builder.createResponseConverter(ServiceMethod.java:741)
      	at retrofit2.ServiceMethod$Builder.build(ServiceMethod.java:172)
      	at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:170)
      	at retrofit2.Retrofit$1.invoke(Retrofit.java:147)
      	at com.sun.proxy.$Proxy85.getServerLicense(Unknown Source)
      	at de.tsystems.mms.apm.performancesignature.dynatrace.rest.DTServerConnection.getServerLicense(DTServerConnection.java:253)
      Caused: hudson.remoting.ProxyException: de.tsystems.mms.apm.performancesignature.dynatrace.rest.xml.CommandExecutionException: error while querying server license: Unable to create converter for class de.tsystems.mms.apm.performancesignature.dynatrace.rest.xml.model.LicenseInformation
          for method CustomXMLApi.getServerLicense
      	at de.tsystems.mms.apm.performancesignature.dynatrace.rest.DTServerConnection.getServerLicense(DTServerConnection.java:256)
      	at de.tsystems.mms.apm.performancesignature.dynatrace.PerfSigStartRecording.perform(PerfSigStartRecording.java:89)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:51)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:48)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	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)
      

          [JENKINS-55202] Performance Signature Plugin: JAXB API is missing with Java 11

          Raphael Pionke created issue -
          Raphael Pionke made changes -
          Summary Original: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath New: Performance Signature Plugin: JAXB API is missing with Java 11
          Raphael Pionke made changes -
          Labels Original: java11-compatibility New: java-11 java11-compatibility
          Raphael Pionke made changes -
          Labels Original: java-11 java11-compatibility New: java11 java11-compatibility
          Raphael Pionke made changes -
          Assignee Original: Raphael Pionke [ rpionke ]

          Oleg Nenashev added a comment -

          That's strange. JAXB should be bundled in Docker.

          rpionke any chance you are passing custom JAVA_OPTS?

           

          Oleg Nenashev added a comment - That's strange. JAXB should be bundled in Docker. rpionke any chance you are passing custom JAVA_OPTS?  

          FTR, I just started a fresh container using jenkins/jenkins:jdk11 image, and docker exec shows the following:

          ps aux | grep java
          jenkins      9  131 14.2 9939268 2280448 ?     Sl   11:25   0:59 java -p /usr/share/jenkins/ref/java_cp/jaxb-api.jar:/usr/share/jenkins/ref/java_cp/javax.activation.jar: --add-modules java.xml.bind,java.activation -cp /usr/share/jenkins/ref/java_cp/jaxb-impl.jar:/usr/share/jenkins/ref/java_cp/jaxb-core.jar -Duser.home=/var/jenkins_home -jar /usr/share/jenkins/jenkins.war --enable-future-java
          

          rpionke in addition to Oleg's question, could you please do the same inside your container and show us what your ps aux | grep java looks like?

          Thank you!

          Baptiste Mathus added a comment - FTR, I just started a fresh container using jenkins/jenkins:jdk11 image, and docker exec shows the following: ps aux | grep java jenkins 9 131 14.2 9939268 2280448 ? Sl 11:25 0:59 java -p /usr/share/jenkins/ref/java_cp/jaxb-api.jar:/usr/share/jenkins/ref/java_cp/javax.activation.jar: --add-modules java.xml.bind,java.activation -cp /usr/share/jenkins/ref/java_cp/jaxb-impl.jar:/usr/share/jenkins/ref/java_cp/jaxb-core.jar -Duser.home=/var/jenkins_home -jar /usr/share/jenkins/jenkins.war --enable-future-java rpionke in addition to Oleg's question, could you please do the same inside your container and show us what your ps aux | grep java looks like? Thank you!

          Raphael Pionke added a comment - - edited

          oleg_nenashev batmat i got the following from docker top:

          {
            "Titles" : [ "PID", "USER", "TIME", "COMMAND" ],
            "Processes" : [ [ "7189", "1000", "0:00", "/sbin/tini -- /usr/local/bin/jenkins.sh" ], [ "7227", "1000", "1:47", "java -p /usr/share/jenkins/ref/java_cp/jaxb-api.jar:/usr/share/jenkins/ref/java_cp/javax.activation.jar: --add-modules java.xml.bind,java.activation -cp /usr/share/jenkins/ref/java_cp/jaxb-impl.jar:/usr/share/jenkins/ref/java_cp/jaxb-core.jar -Duser.home=/var/jenkins_home -jar /usr/share/jenkins/jenkins.war --enable-future-java" ] ]
          }
          

           

          I uploaded sample plugin code based on the hello-world-plugin: https://github.com/rpionke/jaxb-test

          The unit tests and the builder are failing inside hpi:run with the jenkins/jenkins:jdk11 image

          Raphael Pionke added a comment - - edited oleg_nenashev batmat i got the following from docker top: { "Titles" : [ "PID" , "USER" , "TIME" , "COMMAND" ], "Processes" : [ [ "7189" , "1000" , "0:00" , "/sbin/tini -- /usr/local/bin/jenkins.sh" ], [ "7227" , "1000" , "1:47" , "java -p /usr/share/jenkins/ref/java_cp/jaxb-api.jar:/usr/share/jenkins/ref/java_cp/javax.activation.jar: --add-modules java.xml.bind,java.activation -cp /usr/share/jenkins/ref/java_cp/jaxb-impl.jar:/usr/share/jenkins/ref/java_cp/jaxb-core.jar -Duser.home=/ var /jenkins_home -jar /usr/share/jenkins/jenkins.war --enable- future -java" ] ] }   I uploaded sample plugin code based on the hello-world-plugin: https://github.com/rpionke/jaxb-test The unit tests and the builder are failing inside hpi:run with the jenkins/jenkins:jdk11 image
          Baptiste Mathus made changes -
          Labels Original: java11 java11-compatibility New: java11 java11-compatibility triaged
          Baptiste Mathus made changes -
          Labels Original: java11 java11-compatibility triaged New: java11 java11-compatibility scrub triaged

            rpionke Raphael Pionke
            rpionke Raphael Pionke
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: