Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Build failed : Java error
Build failed : Java error [message #1705235] Thu, 13 August 2015 07:49 Go to next message
assil benchaaben is currently offline assil benchaabenFriend
Messages: 2
Registered: March 2015
Junior Member
Hi,

I have this strange error scince i did an update on Hudson plugins. The build faild and i have this error message :

hudson.util.IOException2: remote file operation failed: "my source code path" at hudson.remoting.Channel@1e7066ff:PC_Deploy
at hudson.FilePath.act(FilePath.java:789)
at hudson.FilePath.act(FilePath.java:775)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:786)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:729)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1550)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:607)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:518)
at hudson.model.Run.run(Run.java:1493)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:82)
at hudson.model.Executor.run(Executor.java:137)
Caused by: java.io.IOException: Remote call on PC_Deploy failed
at hudson.remoting.Channel.call(Channel.java:652)
at hudson.FilePath.act(FilePath.java:782)
... 10 more
Caused by: java.lang.ExceptionInInitializerError
at hudson.scm.SubversionWorkspaceSelector.syncWorkspaceFormatFromMaster(SubversionWorkspaceSelector.java:92)
at hudson.scm.SubversionSCM.createSvnClientManager(SubversionSCM.java:864)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:810)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:794)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2059)
at hudson.remoting.UserRequest.perform(UserRequest.java:107)
at hudson.remoting.UserRequest.perform(UserRequest.java:41)
at hudson.remoting.Request$2.run(Request.java:276)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:53)
at java.lang.Thread.run(Unknown Source)
Caused by: com.thoughtworks.xstream.InitializationException: Could not instantiate mapper : com.thoughtworks.xstream.mapper.LambdaMapper : com/thoughtworks/xstream/mapper/LambdaMapper : Unsupported major.minor version 52.0
at com.thoughtworks.xstream.XStream.buildMapperDynamically(XStream.java:629)
at com.thoughtworks.xstream.XStream.buildMapper(XStream.java:603)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:568)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:496)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:465)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:411)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:350)
at hudson.util.XStream2.<init>(XStream2.java:57)
at hudson.model.Hudson.<clinit>(Hudson.java:4111)
... 14 more
Caused by: java.lang.UnsupportedClassVersionError: com/thoughtworks/xstream/mapper/LambdaMapper : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:510)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)
at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch2(RemoteClassLoader.java:387)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:270)
at hudson.remoting.Request$2.run(Request.java:276)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

I check out the java version on my slave machine and hudson's and i have this :

Slave machine : 1.8.0.51
Hudson : 1.7.0_79

What can i do?
Re: Build failed : Java error [message #1705308 is a reply to message #1705235] Thu, 13 August 2015 16:08 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Based on the exception, it is because of JDK mismatch between Master and slave.

Caused by: java.lang.UnsupportedClassVersionError: com/thoughtworks/xstream/mapper/LambdaMapper : Unsupported major.minor version 52.0

Either upgrade Master JDK to 8 or downgrade slave JDK to 7.


Winston Prakash
Eclipse Hudson team
Re: Build failed : Java error [message #1715485 is a reply to message #1705308] Tue, 24 November 2015 02:20 Go to previous messageGo to next message
Chris Lake is currently offline Chris LakeFriend
Messages: 25
Registered: November 2015
Junior Member
I ran in to this exact problem today on upgrading Hudson (mostly for Bug 460866). Is there a reason for this occurring?

We currently run Hudson 3.2.2 without issue. Most Slaves are currently on Java 1.8.60, whilst the Master is on 1.7.07. if this upgrade to Hudson 3.3.2 went well, I was going to update the Master to Java 1.8 which would have resolved the issue, however, we have one old Slave which is Windows XP and apparently shouldn't be updated to Java 1.8 (so says the Java update tool anyway).

Now I'm concerned that I can't get the fix I was after because of the mixed Java version error highlighted here.

Is there a way to force Java 8 to run for Java 7 compatibility? Or some other workaround? Should I just simply roll all Slaves back to Java 7?
Re: Build failed : Java error [message #1715489 is a reply to message #1705308] Tue, 24 November 2015 03:15 Go to previous messageGo to next message
Chris Lake is currently offline Chris LakeFriend
Messages: 25
Registered: November 2015
Junior Member
I can't see my last post yet, but I have found a workaround.

Although Bug 444314 is titled "Upgrade to XStream v. 1.4.7", it actually got updated to v1.4.8. I'm not sure of what all the changes mean (x-stream.github.io/changes.html), but significantly v1.4.8 is compiled against Java 8. To workaround the above problem, I simply swapped xstream-1.4.8.jar for xstream-1.4.7.jar in the WEB-INF/lib directory and now everything appears to be working great Smile
Re: Build failed : Java error [message #1715610 is a reply to message #1715489] Tue, 24 November 2015 16:35 Go to previous message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Hi Chris, you are right. The Xstream version is 1.4.8. I looked at MANIFEST.MF of xstream-1.4.8 and see the following entries

Build-Jdk: 1.8.0_31
X-Compile-Source: 1.5
X-Compile-Target: 1.5

So I guess the generated binary is backward compatible to JDK 5.

Our QA team has setup to vet the build with various combination of JDK. I'm pretty sure they tested the combination of JDK 8 & 7. I will ask them to take a look at this once again.

Hudson uses RMI for remote execution. Means, Java Closures are set across the wire from Master to slave to execute. So the only requirement is slave JDK must be always equal or lower than the master.


Winston Prakash
Eclipse Hudson team
Previous Topic:Output folder contains only Suite folder under test-output
Next Topic:Hudson execute threads are getting dead
Goto Forum:
  


Current Time: Sun Dec 22 06:07:39 GMT 2024

Powered by FUDForum. Page generated in 0.03765 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top