Reky Silva edited a comment on Bug JENKINS-22252

I have encountered a similar problem in our environment, where we have a main jenkins server (called 'master' or 'build') and a slave (called 'build2').

We realise that the exception described above (Caused by: java.lang.IllegalAccessError: class com.google.common.collect.AbstractMapBasedMultimap cannot access its superclass com.google.common.collect.AbstractMultimap) is only thrown when the job runs on build2. build2 was replaced recently which made us compare the versions of maven installed. The conclusion was that master and build2 have different versions of maven: 3.0.4 and 3.0.5 respectively.

Not sure if coincidence or not, but the guava libraries under maven repo ($MAVEN_HOME/lib, where MAVEN_HOME=/ush/share/maven) for each build server had different versions:

  • master:
    build:/usr/share/java$ ls /usr/share/java/gua*
    /usr/share/java/guava.jar -> guava-r09.jar
    /usr/share/java/guava-r09.jar
  • build2:
    build2:/usr/share/java$ ls guava*
    guava.jar
    guava-15.0.jar -> guava.jar


and that was the reason why the job on build2 (checkstyle and pmd) throws an exception; build2 is a slave of master; In order to run a job on build2, a slave.jar is downloaded from master (https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds) but the maven repo used is the one on build2. That slave.jar expects that the guava library available in the maven repo to be r09 (like master). Because it is not, this exception is being thrown.

To fix this issue, I have copied the guava.jar from master to build2:

build2:/usr/share/java$ ls guava*
guava.jar
guava-r09.0.jar -> guava.jar

And now the job runs seamlessly for both master and build2 (without the need to create a freestyle job)!!

System info:
Jenkins 1.546
Maven Integration plugin 2.1
PMD plugin 3.37
checkstyle plugin 3.38
Static Analysis Utilities 1.65
FindBugs-jsr305

Hope this explanation helps.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to