Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » hudson-remoting-3.0.1.jar not being found by mavin
hudson-remoting-3.0.1.jar not being found by mavin [message #1124348] Thu, 03 October 2013 08:55 Go to next message
Mathew Anderson is currently offline Mathew Anderson
Messages: 5
Registered: October 2013
Junior Member
During some builds, using maven, we are getting the following:

[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.6.0_14]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_14]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_14]
	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_14]
	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]
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ~[na:1.6.0_14]
	... 16 common frames omitted


Looking closer, I see the classpath that is autogenerated is invalid:

[INFO] Detected Maven 3 installation version: 3.0.3
[workspace] $ /hudson/maven/slavebundle/bundled-maven/bin/mvn test -V -B -Dmaven.ext.class.path=/hudson/maven/slavebundle/resources:/hudson/maven/slavebundle/lib/maven3-eventspy-3.0.jar:/jboss7/standalone/tmp/vfs/deploymentefadcbeddfa044da/hudson-remoting-3.0.1.jar-df31d207bfb82c69/contents -Dhudson.eventspy.port=57649 -Dmaven.repo.local=/hudson/jobs/MyJob/workspace/.maven/repo -f pom.xml


Note the item in the classpath: /jboss7/standalone/tmp/vfs/deploymentefadcbeddfa044da/hudson-remoting-3.0.1.jar-df31d207bfb82c69/contents

looking on disk, the path, including "contents" exists, but the contents folder is empty. On the same level, the jar file exists. As a quick work around, if I remove "contents" and symlink "hudson-remoting-3.0.1.jar" over to contents, the build can continue and work (until I restart hudson, then the path is recreated again).

Ideas on how to fix this?

I am running hudson 3.1.0 on redhat 5 with Jboss 7.1.1 as the app server. Note that this worked without an issue on hudson 2.1.1 (running on jboss 5)
Re: hudson-remoting-3.0.1.jar not being found by mavin [message #1124776 is a reply to message #1124348] Thu, 03 October 2013 18:24 Go to previous messageGo to next message
Winston Prakash is currently offline Winston Prakash
Messages: 232
Registered: August 2011
Location: Fremont, CA USA
Senior Member
I'm not sure if this has anything to do with how JBoss unzip the WAR and expose the libraries of an application (I'm guessing you have deployed Hudson in JBoss)

On tomcat I don't see the issue

/usr/opt/hudson/hudson_home/maven/slavebundle/bundled-maven/bin/mvn clean install -V -B -e -Dmaven.ext.class.path=/usr/opt/hudson/hudson_home/maven/slavebundle/resources:/usr/opt/hudson/hudson_home/maven/slavebundle/lib/maven3-eventspy-3.0.jar:/usr/opt/hudson/apache-tomcat-7.0.34/hudson-3.1.0/WEB-INF/lib/hudson-remoting-3.0.1.jar -Dhudson.eventspy.port=43184 -f pom.xml


You can see the jar in the classpath is

/usr/opt/hudson/apache-tomcat-7.0.34/hudson-3.1.0/WEB-INF/lib/hudson-remoting-3.0.1.jar


Also I don't see the issue with standalone mode

/usr/opt/hudson/hudson_home/maven/slavebundle/bundled-maven/bin/mvn clean install -V -B -Dmaven.ext.class.path=/usr/opt/hudson/hudson_home/maven/slavebundle/resources:/usr/opt/hudson/hudson_home/maven/slavebundle/lib/maven3-eventspy-3.0.jar:/usr/opt/hudson/hudson_home/war/webapp/WEB-INF/lib/hudson-remoting-3.0.1.jar -Dhudson.eventspy.port=51424 -f pom.xml


Winston Prakash
Eclipse Hudson team
Re: hudson-remoting-3.0.1.jar not being found by mavin [message #1125362 is a reply to message #1124776] Fri, 04 October 2013 08:38 Go to previous messageGo to next message
Mathew Anderson is currently offline Mathew Anderson
Messages: 5
Registered: October 2013
Junior Member

Winston - Thanks for the response.
One of my developers was able to duplicate this as well. Here is his account :

I downloaded the Hudson-3.1.0.war and ran it locally with "java jar hudson-3.1.0.war"

I installed the Promotion Process Plugin (by checking the checkbox when prompted) and other plugins. I created a very simple project with a promotion process and the exact same stack trace was produced.
Re: hudson-remoting-3.0.1.jar not being found by mavin [message #1125716 is a reply to message #1125362] Fri, 04 October 2013 16:29 Go to previous messageGo to next message
Winston Prakash is currently offline Winston Prakash
Messages: 232
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Ok, I will try to reproduce this. I will start with a clean Hudson home. Mean while can you get these info

- Was he building on the master or some slave
- What is the version of maven3 plugin
- Version of JDK


Winston Prakash
Eclipse Hudson team
Re: hudson-remoting-3.0.1.jar not being found by mavin [message #1125731 is a reply to message #1125716] Fri, 04 October 2013 16:47 Go to previous messageGo to next message
Mathew Anderson is currently offline Mathew Anderson
Messages: 5
Registered: October 2013
Junior Member
For mine : Master, no slave server
maven3 : 3.0.3
JDK : 1.6.0_14-b08

I'll get the information from my developer and post that shortly.
Re: hudson-remoting-3.0.1.jar not being found by mavin [message #1125742 is a reply to message #1125731] Fri, 04 October 2013 17:01 Go to previous messageGo to next message
Winston Prakash is currently offline Winston Prakash
Messages: 232
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Mathew, I see you have two topics. One related to

- hudson-remoting-3.0.1.jar not being found (this topic)
- Promoted Builds Plugin on 3.1.0 (http://www.eclipse.org/forums/index.php/t/537649/)

I guess, the message "One of my developers was able to duplicate this as well." is for the latter one which I'm able to reproduce and looking in to it.

I cannot reproduce the remoting issue though. I will download JBoss and try to reproduce



Winston Prakash
Eclipse Hudson team
Re: hudson-remoting-3.0.1.jar not being found by mavin [message #1128311 is a reply to message #1125742] Mon, 07 October 2013 11:03 Go to previous messageGo to next message
Mathew Anderson is currently offline Mathew Anderson
Messages: 5
Registered: October 2013
Junior Member
The duplication was for this issue, not the promoted builds issue. Here we are able to duplicate on windows 7 and on RHEL 5.

For my developer, this is what he said:
I downloaded the Hudson-3.1.0.war and ran it locally on my Windows 7 machine with "java jar hudson-3.1.0.war"
Java version is 1.6.0_32
I installed the Promotion Process Plugin (by checking the checkbox when prompted) and other plugins.

I created a very simple project with a promotion process and the exact same stack trace was produced. I did not need to install maven or even run the build, as the exception happens when you simply "SAVE" the configuration. (I used ant as the build step inside of the promotion process)

Re: hudson-remoting-3.0.1.jar not being found by mavin [message #1128645 is a reply to message #1128311] Mon, 07 October 2013 18:34 Go to previous message
Winston Prakash is currently offline Winston Prakash
Messages: 232
Registered: August 2011
Location: Fremont, CA USA
Senior Member
I'm confused

I did the exact same step as your developer. When I saved the job configuration, I get the exception

java.lang.ClassCastException: hudson.model.LazyTopLevelItem cannot be cast to hudson.plugins.promoted_builds.PromotionProcess
	hudson.plugins.promoted_builds.JobPropertyImpl.<init>(JobPropertyImpl.java:99)
	hudson.plugins.promoted_builds.JobPropertyImpl$DescriptorImpl.newInstance(JobPropertyImpl.java:299)


(As reported in http://www.eclipse.org/forums/index.php/t/537649/)

Not

java.lang.NoClassDefFoundError: hudson/remoting/Channel


As you reported in this thread.

Am I doing something wrong in my steps?





Winston Prakash
Eclipse Hudson team
Previous Topic:Parametrize slave node
Goto Forum:
  


Current Time: Mon Oct 07 18:43:12 EDT 2013

Powered by FUDForum. Page generated in 0.05649 seconds