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

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

XMLWordPrintable

    • 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 `

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

              Created:
              Updated: