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

发布于 2024-10-13 18:52:39 字数 7406 浏览 6 评论 0原文

希望有人能指出导致我在使用 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] ------------------------------------------------------------------------

Hopefully, someone can point out what maybe the issue causing the Fatal Error I receive when doing a Maven build using Hudson.

I just installed an instance of Hudson in Tomcat on a Windows XP box in a test environment. I am a rather novice at Hudson. I am trying to do a simple Maven 'clean' on a small Java project that I know builds fine on another instance of Hudson on another server.

The stack trace from the Hudson console is below:

Thank you


[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] ------------------------------------------------------------------------

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

遮云壑 2024-10-20 18:52:39

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

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

如果是这种情况,我的建议是同步您的本地计算机,使其具有与之前运行的相同版本的 hudson。

Did you happen to copy and paste a job (or entire hudson root) directory from your previous hudson machine to the one you installed? The classnotfound exception is a product of hudson/xstream trying to unmarshall build configuration.

One reason this is happening is because you built the hudson on one machine with a version and then tried to copy and paste the build configuration to your local instance and run hudson with a different version.

My suggestion if thats the case is to synch up your local machine to have the same version of hudson that was previously run on.

养猫人 2024-10-20 18:52:39

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

I have not upgraded or used any other version of hudson or copied any tasks. I am also getting this error! Checking in Hudson I see the 1.395 version is available. I did however just install the M2 maven release plugin.... Seems its stuffs up 1.394? I didn't change my job to use it yet either yet it fails.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文