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

SchemaDVFactoryImpl NoClassDefFoundError with xUnit 2.3.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Latest version of plugins as of 2018-10-30
      Jenkins v2.149
      Amazon EC2 plugin 1.41
      xUnit plugin 2.3.1
      Pipeline 2.6

      OS : Amazon Linux 1 on master, Amazon Linux 2 on fresh new slave
    • Similar Issues:

      Description

      Using xUnit in a Pipeline in a step :

      step([$class: 'XUnitBuilder', thresholds: [[$class: 'FailedThreshold', unstableThreshold: '0']], tools: [ [$class: 'PHPUnitJunitHudsonTestType', pattern: 'tests/_log/report.xml'], [$class: 'JUnitType', pattern: 'web/junit.xml']]])
      

      After updating from xUnit 2.3 to 2.3.1, I face the following exception :
      java.lang.NoClassDefFoundError: Could not initialize class com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl
      The full stack trace is attached.

      Downgrading to xUnit 2.3 seems to solve the problem.

      There seem to be only one related commit between the two xUnit releases.

       

        Attachments

          Activity

          Hide
          nfalco Nikolas Falco added a comment -

          NoClassDefFoundError means that an exception happens in the static block code of SchemaDVFactoryImpl (xerces). I had a look to the sources of com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl some where and from what I can see it initialise internal types needed to parse an XSD.
          Which version of Java are you using to execute Jenkins (not the job)?

          I can not do more about this issue.

          Show
          nfalco Nikolas Falco added a comment - NoClassDefFoundError means that an exception happens in the static block code of SchemaDVFactoryImpl (xerces). I had a look to the sources of com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl some where and from what I can see it initialise internal types needed to parse an XSD. Which version of Java are you using to execute Jenkins (not the job)? I can not do more about this issue.
          Hide
          yurplan_egillet Éric Gillet added a comment -

          Thank you for your answer Nikolas Falco

          We are using the latest java version available on Amazon Linux 1 :

          $ java -version
          openjdk version "1.8.0_181"
          OpenJDK Runtime Environment (build 1.8.0_181-b13)
          OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
          
          Show
          yurplan_egillet Éric Gillet added a comment - Thank you for your answer Nikolas Falco We are using the latest java version available on Amazon Linux 1 : $ java -version openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
          Hide
          nfalco Nikolas Falco added a comment -

          I suppose is not possible test with Oracle JDK 1.8

          Show
          nfalco Nikolas Falco added a comment - I suppose is not possible test with Oracle JDK 1.8
          Hide
          yurplan_egillet Éric Gillet added a comment -

          I think I could do it. Will keep you posted.

          Show
          yurplan_egillet Éric Gillet added a comment - I think I could do it. Will keep you posted.
          Hide
          yurplan_egillet Éric Gillet added a comment -

          I have set up Oracle JRE 1.8, but can no longer reproduce the original issue with xUnit 2.3.1 with either JRE.

          Show
          yurplan_egillet Éric Gillet added a comment - I have set up Oracle JRE 1.8, but can no longer reproduce the original issue with xUnit 2.3.1 with either JRE.

            People

            Assignee:
            nfalco Nikolas Falco
            Reporter:
            yurplan_egillet Éric Gillet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: