Hudson构建失败,出现致命错误(java.lang.ClassNotFoundException:hudson.util.RemotingDiagnostics $ HeapDump)

时间:2011-01-25 17:55:05

标签: maven-2 continuous-integration hudson

希望有人可以指出在使用Hudson进行Maven构建时可能导致致命错误的问题。

我刚刚在测试环境中的Windows XP盒子上安装了Tomcat中的Hudson实例。我是哈德森的新手。我试图在一个小型Java项目上做一个简单的Maven“clean”,我知道在另一台服务器上另一个Hudson实例上构建得很好。

Hudson控制台的堆栈跟踪如下:

谢谢


[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
hudson.util.RemotingDiagnostics$HeapDump
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.reflect.UndeclaredThrowableException
    at $Proxy2.end(Unknown Source)
    at hudson.maven.MavenBuildProxy2$Filter.end(MavenBuildProxy2.java:67)
    at hudson.maven.MavenModuleSetBuild$Builder.postModule(MavenModuleSetBuild.java:922)
    at hudson.maven.MavenBuilder$Adapter.fireLeaveModule(MavenBuilder.java:353)
    at hudson.maven.MavenBuilder$Adapter.postBuild(MavenBuilder.java:311)
    at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:68)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at hudson.maven.agent.Main.launch(Main.java:173)
    at hudson.maven.MavenBuilder.call(MavenBuilder.java:164)
    at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:868)
    at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:799)
    at hudson.remoting.UserRequest.perform(UserRequest.java:114)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:270)
    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:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Remote call on channel failed
    at hudson.remoting.Channel.call(Channel.java:638)
    at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
    ... 28 more
Caused by: java.lang.NoClassDefFoundError: hudson/util/RemotingDiagnostics$HeapDump
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getDeclaredMethod(Class.java:1935)
    at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:128)
    at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:62)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:88)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
    at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
    at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:175)
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:163)
    at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:135)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:130)
    at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:120)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:94)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
    at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:98)
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:38)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:840)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:829)
    at com.thoughtworks.xstream.XStream.toXML(XStream.java:804)
    at hudson.XmlFile.write(XmlFile.java:165)
    at hudson.model.Run.save(Run.java:1493)
    at hudson.maven.MavenModuleSetBuild.notifyModuleBuild(MavenModuleSetBuild.java:458)
    at hudson.maven.MavenBuild$ProxyImpl2.end(MavenBuild.java:479)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at hudson.model.Executor$1.call(Executor.java:429)
    at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
    at $Proxy51.end(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
    ... 9 more
**Caused by: java.lang.ClassNotFoundException: hudson.util.RemotingDiagnostics$HeapDump**
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 55 more
[INFO] ------------------------------------------------------------------------

2 个答案:

答案 0 :(得分:1)

您是否碰巧将您之前的哈德森计算机上的作业(或整个哈德逊根目录)复制并粘贴到您安装的目录中? classnotfound异常是hudson / xstream试图解组构建配置的产物。

发生这种情况的一个原因是因为您在一台机器上使用版本构建了hudson,然后尝试将构建配置复制并粘贴到本地实例并使用不同版本运行hudson。

我的建议是,如果情况是同步本地计算机以获得先前运行的相同版本的哈德森。

答案 1 :(得分:0)

我没有升级或使用任何其他版本的hudson或复制任何任务。我也收到了这个错误!检查Hudson我看到1.395版本可用。然而,我确实安装了M2 maven发布插件....似乎它的东西1.394?我没有改变我的工作来使用它,但它失败了。