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

1,462 views
Skip to first unread message

Jamie

unread,
Nov 3, 2011, 8:43:58 PM11/3/11
to Jenkins Users
Hi all. I've not been able to find a solution to this one thus far so
am hoping I can crowd-source it somewhat. 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'. Stack trace:

arsing POMs
ERROR: Failed to parse POMs
hudson.util.IOException2: remote file operation failed: /Users/jenkins/
Documents/work/workspace/recruiting at
hudson.remoting.Channel@1552efb4:raut.apple.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 raut.apple.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-classloading-from-system-classloader-disabled-exception

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?

Jamie

unread,
Nov 3, 2011, 8:46:11 PM11/3/11
to Jenkins Users
I should mention this is Jenkins 1.436 running on Tomcat 7.0.22.
> http://stackoverflow.com/questions/6653147/jenkins-slave-throws-class...

Khai Do

unread,
Nov 7, 2011, 6:28:17 PM11/7/11
to Jenkins Users
Very frustrating, I am having the same problem. The only way I've
been able to recover is to restart the jenkins master, but obviously
that's not a good solution. Once i restart the master this problem
goes away for a few slave builds then it comes back. I've tried a few
jenkins versions even the LTS 1.409.2 and I've had this same problem
in all of the versions. i'm running jenkins in tomcat 6 on a Centos
Linux machine. My slaves are running on windows and linux.
> >         athudson.remoting.Channel.call(Channel.java:690)

dpreilan

unread,
Nov 8, 2011, 8:21:36 AM11/8/11
to Jenkins Users
I am seeing something similar (remote file exceptions) in other areas:
1) inject environment variables from file
2) copying aritifacts from another job
3) saving artifacts

It has become very unstable since updating a few versions ago. I am
not sure I saw any of this at 1.419, but I am not certain of exact
version where I started hitting this.
I am down to a single node (master) from 5 for now . My users were
getting build failure emails and thinking they committed bad code and
seeing all these java exceptions from the tool.

Doug

Jamie

unread,
Nov 17, 2011, 7:48:06 PM11/17/11
to Jenkins Users
Just tried with Jenkins 1.439. Still no luck.

Jamie

unread,
Nov 28, 2011, 8:25:25 PM11/28/11
to Jenkins Users
Still there in 1.441

jcsirot

unread,
Feb 15, 2012, 11:33:33 AM2/15/12
to jenkins...@googlegroups.com
I'm also facing the same problem.

Jenkins version: 1.451
Jenkins master is running on a Linux Debian
Jenkins slave is a MacOSX Lion 10.7.3
Maven is the default Lion embedded maven 3.0.3
Java is the default Lion embedded JDK

The Log output:

Parsing POMs ERROR: Failed to parse POMs hudson.util.IOException2: remote file operation failed: work/workspace/JAPI-test-mac at hudson.remoting.Channel@11cf4e5:Mac Mini 1 at hudson.FilePath.act(FilePath.java:784) at hudson.FilePath.act(FilePath.java:770) at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:914) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:658) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470) at hudson.model.Run.run(Run.java:1409) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Caused by: java.io.IOException: Remote call on Mac Mini 1 failed at hudson.remoting.Channel.call(Channel.java:690) at hudson.FilePath.act(FilePath.java:777) ... 8 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class hudson.maven.MavenModuleSetBuild at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1180) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1049) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2099) 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 hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 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

any help will be appreciated.

-- 
Jean-Christophe

Anura S Nawarathna

unread,
Sep 4, 2012, 1:26:48 AM9/4/12
to jenkins...@googlegroups.com
I also has the same problem and disconnect and reconnect the slave solved the problem.
Try this.
Good Luck!

Michaël Pailloncy

unread,
Sep 4, 2012, 4:20:10 AM9/4/12
to jenkins...@googlegroups.com
We also have been faced on the same problem. 
We were obliged to restart several times slaves before they can be reused (randomly).
For the record, which version of java on slave and master are you using ?

Our configuration : 
Master : AIX 5.3 - java version "1.6.0" Java(TM) SE Runtime Environment (build pap3260sr9-20101125_01(SR9)) (IBM) 
Slaves : RHEL 5 - java "1.6.0_25" Java(TM) SE Runtime Environment (build 1.6.0_25-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode) 

I think the problem is caused by a different packaging of xercesImpl.jar in master's JRE and slaves' JRE.


I've added the xercesImpl.jar implementation of the master directly in the classpath of the slaves' launchers to be sure that the same packaging of xercesImpl.jar is applyied in both cases.
I'm not sure to clearly understand the root cause, but since I applied this solution the bug doesn't appear anymore (perhaps, I'm just a lucky guy for 2 months :-) ).

An opinion from a more experienced java developer on different types of JVM would be interesting.

Michaël

2012/9/4 Anura S Nawarathna <anu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages