Community
Participate
Working Groups
Hi, I installed the Mylyn Hudson Connector under Helios JavaEE package, added a hudson server, and when tried to "Validate" it, it generated a NPE. I just updated to the latest weekly build. This happened at an internal corporate instance, but I tried also to connect to the public JBoss Hudson instance (http://hudson.jboss.org/hudson/), but I had the same results. -- Error Details -- Date: Mon Sep 13 22:13:14 GMT 2010 Message: Server validation failed: Unexpected error: null Severity: Error Product: Eclipse 1.3.0.20100617-0521 (org.eclipse.epp.package.jee.product) Plugin: org.eclipse.mylyn.builds.ui Session Data: eclipse.buildId=I20100608-0911 java.version=1.5.0_15 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_BR Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product Exception Stack Trace: org.eclipse.core.runtime.CoreException: Unexpected error: null at org.eclipse.mylyn.internal.hudson.core.HudsonCorePlugin.toCoreException(HudsonCorePlugin.java:61) at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.refreshConfiguration(HudsonServerBehaviour.java:488) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation$1.run(RefreshConfigurationOperation.java:75) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation$1.run(RefreshConfigurationOperation.java:1) at org.eclipse.mylyn.builds.internal.core.util.BuildRunner.run(BuildRunner.java:72) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation.doRefresh(RefreshConfigurationOperation.java:72) at org.eclipse.mylyn.builds.ui.spi.BuildServerPart$Validator.run(BuildServerPart.java:117) at org.eclipse.mylyn.commons.ui.team.RepositoryLocationPart$2.run(RepositoryLocationPart.java:579) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.mylyn.internal.hudson.core.client.HudsonException at org.eclipse.mylyn.internal.hudson.core.client.HudsonOperation.run(HudsonOperation.java:36) at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient.getJobs(RestfulHudsonClient.java:256) at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.refreshConfiguration(HudsonServerBehaviour.java:486) ... 7 more Caused by: javax.xml.bind.JAXBException - with linked exception: [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:186) at javax.xml.bind.ContextFinder.find(ContextFinder.java:375) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:565) at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient.unmarshal(RestfulHudsonClient.java:361) at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient$4.execute(RestfulHudsonClient.java:232) at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient$4.execute(RestfulHudsonClient.java:1) at org.eclipse.mylyn.internal.hudson.core.client.HudsonOperation.run(HudsonOperation.java:32) ... 9 more Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory 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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:129) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:480) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:184) ... 16 more
Actually, it was my fault. I was running Eclipse under a 1.5 JVM. Running it under 1.6 worked. I didn't see this information on wiki. I suggest you to make this information more visible, because more people can stumble on this.
Hmm, we didn't document it because I was hoping it would work on 1.5 but I didn't get around to testing it, yet. Thanks for checking this. I'll look into it but this might require a change to the javax.xml.bind bundle.
Created attachment 178778 [details] patch
Created attachment 178889 [details] fix
Created attachment 178890 [details] mylyn/context/zip
I have committed the fix which hard wires the JAXB dependency to com.sun.xml.bind instead of relying on the platform to provide an implementation. That should work on Java 1.5 and 1.6.
Has anything changed in the incubator update site? I just tried to download the hudson connector, and it does not appear anymore. I tried to install it with a clean installation, clean workspace, Eclipse 3.6.1, 1.5 and 1.6 JVMs.
Thanks for letting us know. The webmaster has confirmed that there were changes to the mirroring which might have caused that problem. Please let me know if you still have problems installing.
It's fine now. Thanks!
(In reply to comment #6) > I have committed the fix which hard wires the JAXB dependency to > com.sun.xml.bind instead of relying on the platform to provide an > implementation. That should work on Java 1.5 and 1.6. As far as I've been told, this also hard-wires RestfulHudsonClient.java to one specific implementation of JAXB, namely Oracle's Glassfish implementation. Unfortunately this doesn't work with, say Apache.org's implementation (http://ws.apache.org/jaxme/) :-(
This seems like an older bug and is marked as fixed but I downloaded Indigo JavaEE recently, everything's up-to-date (afaik), and I'm getting this same issue. I'm using JDK 1.7_03, Jenkins 1.459, eclipse.buildId=M20120208-0800. org.eclipse.core.runtime.CoreException: Unexpected error: null at org.eclipse.mylyn.internal.hudson.core.HudsonCorePlugin.toCoreException(HudsonCorePlugin.java:61) ... Caused by: org.eclipse.mylyn.internal.hudson.core.client.HudsonException at org.eclipse.mylyn.internal.hudson.core.client.HudsonOperation.run(HudsonOperation.java:145) ... Caused by: org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822) ... Caused by: org.apache.http.ProtocolException: The server failed to respond with a valid HTTP response at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:109) It was working initially but not since I've upgraded Jenkins, cleaned the user dir, etc. Both Validate and Refresh result in the exception. But the same url works fine in my browser.
Same here, maybe the following stack-trace helps: !ENTRY org.eclipse.mylyn.builds.ui 4 0 2012-06-08 11:25:39.783 !MESSAGE Server validation failed: Unexpected error: null !STACK 1 org.eclipse.core.runtime.CoreException: Unexpected error: null at org.eclipse.mylyn.internal.hudson.core.HudsonCorePlugin.toCoreException(HudsonCorePlugin.java:61) at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.refreshConfiguration(HudsonServerBehaviour.java:782) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation$1.run(RefreshConfigurationOperation.java:75) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation$1.run(RefreshConfigurationOperation.java:1) at org.eclipse.mylyn.builds.internal.core.util.BuildRunner.run(BuildRunner.java:72) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation.doRefresh(RefreshConfigurationOperation.java:72) at org.eclipse.mylyn.builds.ui.spi.BuildServerPart$Validator.run(BuildServerPart.java:118) at org.eclipse.mylyn.commons.repositories.ui.RepositoryLocationPart$2.run(RepositoryLocationPart.java:558) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.mylyn.internal.hudson.core.client.HudsonException at org.eclipse.mylyn.internal.hudson.core.client.HudsonOperation.run(HudsonOperation.java:145) at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient.getJobs(RestfulHudsonClient.java:293) at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.refreshConfiguration(HudsonServerBehaviour.java:780) ... 7 more Caused by: org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822) at org.eclipse.mylyn.commons.repositories.http.core.HttpUtil$1.execute(HttpUtil.java:178) at org.eclipse.mylyn.commons.repositories.http.core.HttpUtil$1.execute(HttpUtil.java:1) at org.eclipse.mylyn.commons.core.operations.MonitoredOperation.call(MonitoredOperation.java:82) 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:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: org.apache.http.ProtocolException: The server failed to respond with a valid HTTP response at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:109) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:282) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247) at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:645) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) ... 8 more !SUBENTRY 1 org.eclipse.mylyn.hudson.core 4 0 2012-06-08 11:25:39.784 !MESSAGE Unexpected error: null !STACK 0 org.eclipse.mylyn.internal.hudson.core.client.HudsonException at org.eclipse.mylyn.internal.hudson.core.client.HudsonOperation.run(HudsonOperation.java:145) at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient.getJobs(RestfulHudsonClient.java:293) at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.refreshConfiguration(HudsonServerBehaviour.java:780) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation$1.run(RefreshConfigurationOperation.java:75) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation$1.run(RefreshConfigurationOperation.java:1) at org.eclipse.mylyn.builds.internal.core.util.BuildRunner.run(BuildRunner.java:72) at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation.doRefresh(RefreshConfigurationOperation.java:72) at org.eclipse.mylyn.builds.ui.spi.BuildServerPart$Validator.run(BuildServerPart.java:118) at org.eclipse.mylyn.commons.repositories.ui.RepositoryLocationPart$2.run(RepositoryLocationPart.java:558) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822) at org.eclipse.mylyn.commons.repositories.http.core.HttpUtil$1.execute(HttpUtil.java:178) at org.eclipse.mylyn.commons.repositories.http.core.HttpUtil$1.execute(HttpUtil.java:1) at org.eclipse.mylyn.commons.core.operations.MonitoredOperation.call(MonitoredOperation.java:82) 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:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: org.apache.http.ProtocolException: The server failed to respond with a valid HTTP response at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:109) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:282) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247) at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:645) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) ... 8 more
Note that there is a known incompatibility with latest version of Jenkins: bug 376468.