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

Maven Build on Mac OS X Slave Fails: NoClassDefFound error when parsing pom.xml

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Labels:
      None
    • Environment:
      Slave: Mac OS X 10.7.2 (11C74) (x86_64), 12GB RAM
      Master: Linux VM (OEL) 2.6.32-200.20.1.el5uek
      App Server: Tomcat 7.0.22

    • Similar Issues:

      Description

      I have a Jenkins master running on Linux and a slave running Mac OS X. The master/slave setup is able to build XCode based projects but fails when I try and build my Maven one. Slave launch method is 'Launch slave agents on Unix machines via SSH'. (Have tried Web Start also, same result.) Stack trace:

      Parsing POMs
      ERROR: Failed to parse POMs
      hudson.util.IOException2: remote file operation failed: /Users/jenkins/
      Documents/work/workspace/recruiting at
      hudson.remoting.Channel@1552efb4:host.company.com
      at hudson.FilePath.act(FilePath.java:781)
      at hudson.FilePath.act(FilePath.java:767)
      at hudson.maven.MavenModuleSetBuild
      $RunnerImpl.parsePoms(MavenModuleSetBuild.java:894)
      at hudson.maven.MavenModuleSetBuild
      $RunnerImpl.doRun(MavenModuleSetBuild.java:644)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:
      460)
      at hudson.model.Run.run(Run.java:1404)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:470)
      at hudson.model.ResourceController.execute(ResourceController.java:
      88)
      at hudson.model.Executor.run(Executor.java:230)
      Caused by: java.io.IOException: Remote call on host.company.com failed
      at hudson.remoting.Channel.call(Channel.java:690)
      at hudson.FilePath.act(FilePath.java:774)
      ... 8 more
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class
      hudson.maven.MavenModuleSetBuild
      at hudson.maven.MavenModuleSetBuild
      $PomParser.invoke(MavenModuleSetBuild.java:1156)
      at hudson.maven.MavenModuleSetBuild
      $PomParser.invoke(MavenModuleSetBuild.java:1029)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2022)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:287)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
      441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor
      $Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor
      $Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:680)
      Finished: FAILURE
      The closest issue I found to this one was:
      http://stackoverflow.com/questions/6653147/jenkins-slave-throws-class...
      but that solution (delete the xercesImpl.jar in the Jenkins WEB-INF/
      lib directory) didn't work for us.
      Any ideas? More information I can provide?

      I attempted to find a solution through the user mailing list:

      http://groups.google.com/group/jenkinsci-users/browse_thread/thread/b404c8ba4edf9f91

      Issue has persisted through versions 1.436, 1.439, 1.441. The Maven build works fine if I SSH to the slave myself, set the MAVEN_HOME appropriately and run it:

      raut:slave-test jenkins$ which mvn
      /usr/bin/mvn
      raut:slave-test jenkins$ export MAVEN_HOME=/Users/jenkins/Documents/work/tools/maven-2.0.9/
      raut:slave-test jenkins$ export PATH=$MAVEN_HOME/bin:$PATH
      raut:slave-test jenkins$ which mvn
      /Users/jenkins/Documents/work/tools/maven-2.0.9//bin/mvn
      raut:slave-test jenkins$ mvn clean install
      .
      .
      .
      .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4 minutes 21 seconds
      [INFO] Finished at: Fri Dec 02 12:57:29 PST 2011
      [INFO] Final Memory: 24M/81M
      [INFO] ------------------------------------------------------------------------
      raut:slave-test jenkins$

      Everything from the systemInfo URL:

      System Properties

      awt.toolkit sun.awt.X11.XToolkit
      catalina.base /ngs/app/cibuildd/tomcat
      catalina.home /ngs/app/cibuildd/tomcat
      catalina.useNaming true
      common.loader $

      {catalina.base}/lib,${catalina.base}

      /lib/*.jar,$

      {catalina.home}/lib,${catalina.home}

      /lib/*.jar
      file.encoding UTF-8
      file.encoding.pkg sun.io
      file.separator /
      guice.disable.misplaced.annotation.check true
      java.awt.graphicsenv sun.awt.X11GraphicsEnvironment
      java.awt.printerjob sun.print.PSPrinterJob
      java.class.path /ngs/app/cibuildd/tomcat/bin/bootstrap.jar:/ngs/app/cibuildd/tomcat/bin/tomcat-juli.jar
      java.class.version 51.0
      java.endorsed.dirs /ngs/app/cibuildd/tomcat/endorsed
      java.ext.dirs /usr/java/jdk1.7.0/jre/lib/ext:/usr/java/packages/lib/ext
      java.home /usr/java/jdk1.7.0/jre
      java.io.tmpdir /ngs/app/cibuildd/tomcat/temp
      java.library.path /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
      java.naming.factory.initial org.apache.naming.java.javaURLContextFactory
      java.naming.factory.url.pkgs org.apache.naming
      java.runtime.name Java(TM) SE Runtime Environment
      java.runtime.version 1.7.0-b147
      java.specification.name Java Platform API Specification
      java.specification.vendor Oracle Corporation
      java.specification.version 1.7
      java.util.logging.config.file /ngs/app/cibuildd/tomcat/conf/logging.properties
      java.util.logging.manager org.apache.juli.ClassLoaderLogManager
      java.vendor Oracle Corporation
      java.vendor.url http://java.oracle.com/
      java.vendor.url.bug http://bugreport.sun.com/bugreport/
      java.version 1.7.0
      java.vm.info mixed mode
      java.vm.name Java HotSpot(TM) 64-Bit Server VM
      java.vm.specification.name Java Virtual Machine Specification
      java.vm.specification.vendor Oracle Corporation
      java.vm.specification.version 1.7
      java.vm.vendor Oracle Corporation
      java.vm.version 21.0-b17
      jna.platform.library.path /usr/lib64:/lib64:/usr/lib:/lib
      jruby.management.enabled true
      line.separator
      mail.smtp.sendpartial true
      mail.smtps.sendpartial true
      os.arch amd64
      os.name Linux
      os.version 2.6.32-200.20.1.el5uek
      package.access sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
      package.definition sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
      path.separator :
      securerandom.source file:/dev/./urandom
      server.loader
      shared.loader
      sun.arch.data.model 64
      sun.boot.class.path /usr/java/jdk1.7.0/jre/lib/resources.jar:/usr/java/jdk1.7.0/jre/lib/rt.jar:/usr/java/jdk1.7.0/jre/lib/sunrsasign.jar:/usr/java/jdk1.7.0/jre/lib/jsse.jar:/usr/java/jdk1.7.0/jre/lib/jce.jar:/usr/java/jdk1.7.0/jre/lib/charsets.jar:/usr/java/jdk1.7.0/jre/classes
      sun.boot.library.path /usr/java/jdk1.7.0/jre/lib/amd64
      sun.cpu.endian little
      sun.cpu.isalist
      sun.io.unicode.encoding UnicodeLittle
      sun.java.command org.apache.catalina.startup.Bootstrap start
      sun.java.launcher SUN_STANDARD
      sun.jnu.encoding UTF-8
      sun.management.compiler HotSpot 64-Bit Tiered Compilers
      sun.os.patch.level unknown
      svnkit.http.methods Digest,Basic,NTLM,Negotiate
      svnkit.ssh2.persistent false
      tomcat.util.buf.StringCache.byte.enabled true
      tomcat.util.scan.DefaultJarScanner.jarsToSkip bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,jasper.jar,jasper-el.jar,ecj-.jar,tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,tomcat-jdbc.jar,commons-beanutils.jar,commons-codec*.jar,commons-collections*.jar,commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,commons-math*.jar,commons-pool*.jar,jstl.jar,geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunmscapi.jar,sunpkcs11.jar,jhall.jar,tools.jar,sunec.jar,zipfs.jar,apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar,junit.jar,junit-*.jar,ant-launcher.jar
      user.country US
      user.dir /ngs/app/cibuildd/tomcat-7.0.22/bin
      user.home /ngs/app/cibuildd
      user.language en
      user.name cibuildd
      user.timezone Etc/GMT+0

      Environment Variables

      CATALINA_HOME /ngs/app/cibuildd/tomcat
      G_BROKEN_FILENAMES 1
      HISTSIZE 1000
      HOME /ngs/app/cibuildd
      HOSTNAME host.company.com
      INPUTRC /etc/inputrc
      JAVA_HOME /usr/java/jdk1.7.0
      JAVA_OPTS -Xmx3g -Xms3g -XX:MaxPermSize=512m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
      LANG en_US.UTF-8
      LESSOPEN |/usr/bin/lesspipe.sh %s
      LOGNAME cibuildd
      LS_COLORS
      MAIL /var/spool/mail/cibuildd
      NLSPATH /usr/dt/lib/nls/msg/%L/%N.cat
      PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/java/jdk1.7.0/bin
      PWD /ngs/app/cibuildd/tomcat/bin
      SHELL /bin/bash
      SHLVL 2
      TERM xterm-256color
      TMOUT 900
      USER cibuildd
      XFILESEARCHPATH /usr/dt/app-defaults/%L/Dt
      _ /usr/java/jdk1.7.0/bin/java

      Plugins

      ant 1.1 true false
      javadoc 1.0 true false
      subversion 1.34 true true
      translation 1.8 true false
      ssh-slaves 0.21 true true
      cvs 1.6 true true
      maven-plugin 1.441 true false
      clang-scanbuild-plugin 1.2 true false
      crowd 1.2 true false
      nabaztag 1.9 true false
      simple-theme-plugin 0.2 true false
      greenballs 1.11 true false
      sonar 1.7.1 true false
      email-ext 2.16 true false
      schedule-failed-builds

        Attachments

          Activity

            People

            • Assignee:
              olamy olamy
              Reporter:
              raut Jamie Raut
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: