HudsonPluginForPlay
HudsonPluginForPlay copied to clipboard
play command getting me NoClassDefFoundError without classname...
I am using openjdk 6 and jenkins 1.437. The build direktly under CLI works fine for me. I am also using the xvnc plugin.
~ play! 1.2.3, http://www.playframework.org ~ ~ Deleting /home/jenkins/work/jobs/app/workspace/tmp ~ Executing /usr/local/play-1.2.3/play precompile "/home/jenkins/work/jobs/app/workspace" [workspace] $ /usr/local/play-1.2.3/play precompile /home/jenkins/work/jobs/app/workspace Exception in thread "main" java.lang.NoClassDefFoundError: Caused by: java.lang.ClassNotFoundException: at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334) Could not find the main class: . Program will exit.
any progress on this one? We're having equal symptoms
i just replaced version 1.2.3 with version 1.2.2 and the error went away. I will give 1.2.4 another try :-).
Sorry. I've been busy and will be busy this year... I'll try to check it in new year break..
The latest plugin update seems to work perfekt with play 1.2.4. So i think this issue is done.
Oh, really? Thanks!
We also have this issue running jenkins 1.424.1 on ubuntu with openjdk 6 and play 1.2.4. Currently it happens on play command restart.
Thanks. Would you attach a stack trace or something info?
play! 1.2.4, http://www.playframework.org
~ framework ID is stage
~
JPDA port 8000 is already used. Will try to use any free port for debugging
~ OK, /var/lib/jenkins/jobs/MatchupStage/workspace is restarted
~ output is redirected to /var/lib/jenkins/jobs/MatchupStage/workspace/logs/system.out
~ New pid is 32596
~
Exception in thread "main" java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: . Program will exit.
Each commands' results:
restart: Done
ln -s builds/2012-01-25_10-41-18 /var/lib/jenkins/jobs/MatchupStage/builds/../lastSuccessful failed: -1
ln -s builds/2012-01-25_10-41-18 /var/lib/jenkins/jobs/MatchupStage/builds/../lastStable failed: -1
Finished: SUCCESS
The play application crashes when restarted from jenkins but not if I restart it manually as our jenkins user. Could it be the OpenJDK?
Ok, it isn't an issue with OpenJDK. Today we tried the Sun 6 JDK but the problem still exists. I guess next we try to downgrade the plugin?
Is there any news on this fix?
I'm also investigating this problem together with a colleague. I'll get back here if/when we find a solution.
Sorry for waiting. I'll check it soon, maybe in this month...
Ok, We don't get the ClassNotFoundException any more. We've done a couple of changes and to be honest, I'm not really sure which one of them made the errors go away.
First of all we added a parameter to the JAVA_OPTS in the jenkins.conf-file. We're running Ubuntu so our file is located in /etc/init/jenkins.conf
We use Jenkins to "restart" one of our play servers when we've pushed new features to our git-repo. We don't want Jenkins killing off our play process. So we tried adding the jvm-parameter below.
env JAVA_OPTS="-Dhudson.util.ProcessTreeKiller.disable=true"
We also noticed that the class com.gmail.ikeike443.PlayAutoTestBuilder used the deprecated way of launching processes. So we modified the code to use the new way with Launcher.ProcStarter. We also did some refactorings and broke the "perform"-method into smaller pieces.
The changes can be found in this repo: https://github.com/jorgen99/HudsonPluginForPlay
Try using a version of it and see if it helps you.
/Jörgen
Thank you.
I'll merge it. But are you sure that this patch is a solution for the issue?
Honestly, I have not ever faced this problem.
I have been using this plugin with play-1.2.2, 1.2.3, 1.2.4 and with jenkins-1.450.
Does anybody face this problem still now?
Jorgen's solution may help you...
Are there any more info?
Thanks.
I will release jorgen's ver after getting more info.
Did you install from this repo by handed packaging (hudsonpluglinforplay) or from jenkins update center (play-plugin) ?
The version that we used when we were experiencing the problems was installed with the plugin-manager inside Jenkins.
Thanks.
Hmmmmm
OMG, I've just faced this problem with 0.0.13-SNAPSHOT just now!! But, when re-installing 0.0.12 from the plugin-manager, I do not faced this problem.
What is it..
Strange! So it seems like we did not solve the problem after all. I'll try and install 0.0.12 again and see if I can reproduce the problem again.
Jenkins log:
2012/03/23 18:58:26 hudson.util.RobustReflectionConverter doUnmarshal
警告: Skipping a non-existent type
com.thoughtworks.xstream.mapper.CannotResolveClassException: com.gmail.ikeike443.PlayAutoTestBuilder$1 : com.gmail.ikeike443.PlayAutoTestBuilder$1
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:68)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:71)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:86)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:96)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:215)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:43)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:56)
at hudson.util.RobustReflectionConverter.determineType(RobustReflectionConverter.java:360)
at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:230)
at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:181)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
at hudson.util.CopyOnWriteList$ConverterImpl.unmarshal(CopyOnWriteList.java:193)
at hudson.util.DescribableList$ConverterImpl.unmarshal(DescribableList.java:244)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:292)
at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:234)
at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:181)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:926)
at hudson.util.XStream2.unmarshal(XStream2.java:93)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:912)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:864)
at hudson.XmlFile.read(XmlFile.java:133)
at hudson.model.Items.load(Items.java:114)
at jenkins.model.Jenkins$15.run(Jenkins.java:2421)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at jenkins.model.Jenkins$6.runTask(Jenkins.java:840)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
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:662)
I am reading and investigating now..... http://jenkins.361315.n4.nabble.com/Not-stable-td4465894.html
Thanks Jorgen.
We're running Jenkins ver. 1.424.6, by the way.
I don't sure but maybe this problem is around loading job/config.xml...
Facing this issue on OS : win 7 64 JDK : 1.6.0_30 Tomcat : 7.0.25 Jenkins : 1.460 playframework-plugin : 0.0.12 play: 1.2.4 Code is on github : http://github.com/smougenot/DevOps_demo/tree/master/BACK_OFFICE/pe_presentation
My build launches several "Play commands" using jenkins : clean then deps and then precompile
this last operation throw the exception
Maybe there is a lead coherent with the modification of JAVA_OPTS. http://groups.google.com/group/play-framework/browse_thread/thread/69d1500c7d05300c
Addon to my former message
Running Jenkins in standalone mode does not cause this problem.
"%JAVA_HOME%\bin\java.exe" -jar jenkins.war