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

processMavenSpyLogs can fail with "java.lang.IllegalAccessError: tried to access method"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins Core 2.107.x
      Maven-pipeline 3.5.6

      Issue:
      When running a maven process inside of a build an error popped up saying

      java.lang.IllegalAccessError: tried to access method org.apache.xerces.parsers.XML11Configuration.getFeature0(Ljava/lang/String;)Z from class org.apache.xerces.parsers.XIncludeAwareParserConfiguration 
      at org.apache.xerces.parsers.XIncludeAwareParserConfiguration.getFeature(Unknown Source) 
      at org.apache.xerces.parsers.AbstractDOMParser.reset(Unknown Source) 
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) 
      at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) 
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) 
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) 
      at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:97) 
      at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$WithMavenStepExecutionCallBack.finished(WithMavenStepExecution.java:1050) 
      

      It seems to come from the code here:
      https://github.com/jenkinsci/pipeline-maven-plugin/blob/1729e64250c10213ca428141092540bdeeaba97a/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/MavenSpyLogProcessor.java#L97

      Steps to reproduce:
      I have not been able to narrow down why it is unable to load a library so it happened with one job but not with others.

      Workaround:
      Disable the spy event entirely with `JENKINS_MAVEN_AGENT_DISABLED = true `

          [JENKINS-51404] processMavenSpyLogs can fail with "java.lang.IllegalAccessError: tried to access method"

          Alex Taylor created issue -
          Cyrille Le Clerc made changes -
          Link New: This issue is related to JENKINS-47486 [ JENKINS-47486 ]
          Cyrille Le Clerc made changes -
          Assignee Original: Alvaro Lobato [ alobato ] New: Cyrille Le Clerc [ cleclerc ]
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal CD-554 (Web Link)" [ 20691 ]
          Cyrille Le Clerc made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Alex Taylor made changes -
          Comment [ [~cleclerc] The output was this:

          {code:java}
          class org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -> file:/var/lib/jenkins/plugins/analysis-core/WEB-INF/lib/xercesImpl-2.11.0.jar
          {code}

          Sorry for not giving this earlier! ]
          Ulli Hafner made changes -
          Link New: This issue relates to JENKINS-54700 [ JENKINS-54700 ]
          Arnaud Héritier made changes -
          Assignee Original: Cyrille Le Clerc [ cleclerc ]
          Arnaud Héritier made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]

            Unassigned Unassigned
            ataylor Alex Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: