Hudson + Jboss AS 7.1 + Maven 3 Project Build Error

Posted by Zehra Gül Çabuk on Stack Overflow See other posts from Stack Overflow or by Zehra Gül Çabuk
Published on 2012-06-07T07:00:11Z Indexed on 2012/06/16 21:16 UTC
Read the original article Hit count: 497

Filed under:
|
|
|

I've wanted to prepare an environment that I'm able to build my project and run my tests on a integration server. So I've installed an Jboss application server 7.1 and deployed hudson.war to it. Then I've created a project to trigger "mvn clean install" and when I built it I've got following exception.

[INFO] Using bundled Maven 3 installation
[INFO] Checking Maven 3 installation environment
[workspace] $ /disk7/hudson_home/maven/slavebundle/bundled-maven/bin/mvn --help
[INFO] Checking Maven 3 installation version
[INFO] Detected Maven 3 installation version: 3.0.3
[workspace] $ /disk7/hudson_home/maven/slavebundle/bundled-maven/bin/mvn clean install -V -B -Dmaven.ext.class.path=/disk7/hudson_home/maven/slavebundle/resources:/disk7/hudson_home/maven/slavebundle/lib/maven3-eventspy-3.0.jar:/disk7/jboss-as-7.1.0.Final/standalone/tmp/vfs/deploymentdf2a6dfa59ee3407/hudson-remoting-2.2.0.jar-407215e5de02980f/contents -Dhudson.eventspy.port=37183 -f pom.xml
[DEBUG] Waiting for connection on port: 37183
Apache Maven 3.0.3 (r1075438; 2011-02-28 19:31:09+0200)
Maven home: /disk7/hudson_home/maven/slavebundle/bundled-maven
Java version: 1.7.0_04, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.7.0_04/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"
[ERROR] o.h.m.e.DelegatingEventSpy - Init failed
java.lang.NoClassDefFoundError: hudson/remoting/Channel
at org.hudsonci.maven.eventspy.common.RemotingClient.open(RemotingClient.java:103) ~[maven3-eventspy-runtime.jar:na]
at org.hudsonci.maven.eventspy_30.RemotingEventSpy.openChannel(RemotingEventSpy.java:86) ~[maven3-eventspy-3.0.jar:na]
at org.hudsonci.maven.eventspy_30.RemotingEventSpy.init(RemotingEventSpy.java:114) ~[maven3-eventspy-3.0.jar:na]
at org.hudsonci.maven.eventspy_30.DelegatingEventSpy.init(DelegatingEventSpy.java:128) ~[maven3-eventspy-3.0.jar:na]
at org.apache.maven.eventspy.internal.EventSpyDispatcher.init(EventSpyDispatcher.java:84) [maven-core-3.0.3.jar:3.0.3]
at org.apache.maven.cli.MavenCli.container(MavenCli.java:403) [maven-embedder-3.0.3.jar:3.0.3]
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191) [maven-embedder-3.0.3.jar:3.0.3]
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) [maven-embedder-3.0.3.jar:3.0.3]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_04]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_04]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_04]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_04]
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) [plexus-classworlds-2.4.jar:na]
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) [plexus-classworlds-2.4.jar:na]
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) [plexus-classworlds-2.4.jar:na]
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) [plexus-classworlds-2.4.jar:na]
Caused by: java.lang.ClassNotFoundException: hudson.remoting.Channel
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) ~[plexus-classworlds-2.4.jar:na]
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) ~[plexus-classworlds-2.4.jar:na]
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) ~[plexus-classworlds-2.4.jar:na]
... 16 common frames omitted
[ERROR] ABORTED
[ERROR] Failed to initialize
[ERROR] Caused by: hudson/remoting/Channel
[ERROR] Caused by: hudson.remoting.Channel
[ERROR] Failure: java.net.SocketException: Connection reset
FATAL: Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at hudson.remoting.Channel.<init>(Channel.java:385)
at hudson.remoting.Channel.<init>(Channel.java:347)
at hudson.remoting.Channel.<init>(Channel.java:320)
at hudson.remoting.Channel.<init>(Channel.java:315)
at hudson.slaves.Channels$1.<init>(Channels.java:71)
at hudson.slaves.Channels.forProcess(Channels.java:71)
at org.hudsonci.maven.plugin.builder.internal.PerformBuild.doExecute(PerformBuild.java:174)
at org.hudsonci.utils.tasks.PerformOperation.execute(PerformOperation.java:58)
at org.hudsonci.maven.plugin.builder.MavenBuilder.perform(MavenBuilder.java:169)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:630)
at hudson.model.Build$RunnerImpl.build(Build.java:175)
at hudson.model.Build$RunnerImpl.doRun(Build.java:137)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
at hudson.model.Run.run(Run.java:1366)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:145)

I want to point out the command which is tried to execute by hudson :

/disk7/hudson_home/maven/slavebundle/bundled-maven/bin/mvn clean install -V -B -Dmaven.ext.class.path=/disk7/hudson_home/maven/slavebundle/resources:/disk7/hudson_home/maven/slavebundle/lib/maven3-eventspy-3.0.jar:/disk7/jboss-as-7.1.0.Final/standalone/tmp/vfs/deploymentdf2a6dfa59ee3407/hudson-remoting-2.2.0.jar-407215e5de02980f/contents -Dhudson.eventspy.port=37183 -f pom.xml

It tries to find "hudson-remoting-2.2.0.jar" to put it to build path but it searches it at the wrong place because when I look where the hudson-remoting jar I found it at /disk7/jboss-as-7.1.0.Final/standalone/tmp/vfs/deploymentdf2a6dfa59ee3407/hudson-remoting-2.2.0.jar-407215e5de02980f/hudson-remoting-2.2.0.jar for this build(not in contents).

So how can I configure the hudson to force it looking at the right place for jars? Is there anyone has an idea?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about maven

Related posts about build