2011-01-25 40 views
2

希望有人可以指出使用Hudson進行Maven構建時可能導致致命錯誤的問題。

我剛剛在測試環境中的Windows XP盒子上的Tomcat中安裝了Hudson實例。我在哈德森是個新手。我正在嘗試在一個小型Java項目上做一個簡單的Maven'clean',我知道在另一個服務器上的另一個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] ------------------------------------------------------------------------ 
+0

版本的Maven,Hudson和Java? – Sagar 2011-01-26 13:49:58

+0

Maven 2.2.1,Hudson ver。 1.393,Java 1.6.0_04 – anseltim 2011-01-27 23:14:35

回答

1

難道你碰巧目錄從以前的哈德森複製和粘貼的工作(或整個哈得孫根)機器到你安裝的那個? classnotfound異常是試圖解構編譯配置的hudson/xstream的產物。

發生這種情況的一個原因是,您在一臺機器上使用某個版本構建了哈德森,然後嘗試將構建配置複製並粘貼到本地實例,並使用不同版本運行哈德森。

我的建議,如果是這樣的情況下,你的本地機器同步版本的哈德森以前運行。

0

我還沒有升級或使用任何其他版本的哈德森或複製任何任務。我也得到這個錯誤!檢查Hudson我看到1.395版本可用。不過我只是安裝了M2 Maven發佈插件....似乎它的東西了1.394?我沒有改變我的工作,但仍然失敗。

相關問題