Community
Participate
Working Groups
after upgrading the JGit HIPP to Hudson 3.3.2 I hit the following exception when manually triggering a build for a Gerrit change java.lang.NoSuchMethodError: hudson.model.Hudson.getAuthentication()Lorg/springframework/security/Authentication; at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.manual.ManualTriggerAction.findAndCreatePatchSetEvent(ManualTriggerAction.java:425) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.manual.ManualTriggerAction.doBuild(ManualTriggerAction.java:262) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:274) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:141) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:80) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:95) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:45) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:566) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:651) at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:365) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:566) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:651) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:482) at org.kohsuke.stapler.Stapler.service(Stapler.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96) at org.hudsonci.servlets.internal.ServletRegistrationFilterAdapter.doFilter(ServletRegistrationFilterAdapter.java:162) at org.hudsonci.servlets.internal.ServletRegistrationFilterAdapter.doFilter(ServletRegistrationFilterAdapter.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99) at org.hudsonci.servlets.internal.ServletRegistrationFilterAdapter.doFilter(ServletRegistrationFilterAdapter.java:162) at org.hudsonci.servlets.internal.ServletRegistrationFilterAdapter.doFilter(ServletRegistrationFilterAdapter.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:81) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:47) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:73) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:497) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) I get a very similar stack trace when trying to retrigger an existing change. It seems this is the third reincarnation of a similar regression we hit after upgrading Hudson: see Bug 390495 (Sept 2012, upgrade of shared ) and Bug 461174 (upgrade to Hudson 3.2.2, Mar 2015) could you please fix this and add a test to your test suite which prevents that we see this regression again with the next Hudson upgrade to come ?
the version of the installed Gerrit trigger plugin is 2.5.3-h-2 which worked with the Hudson version we used before the upgrade (3.0.1-b2)
*** Bug 485355 has been marked as a duplicate of this bug. ***
Just wondering what is the root cause? Is there still any development community behind hudson, or everyone is on jenkins now? https://projects.eclipse.org/projects/technology.hudson/who https://github.com/jenkinsci/jenkins/graphs/commit-activity
compare these numbers available on OpenHub: Jenkins [1] - last 12 months: 4701 commits from 292 contributors - last 1 month: 159 commits from 35 contributors Hudson [2] - last 12 months: 110 commits from 7 contributors - last 1 month: 5 commits from 2 contributors [1] https://www.openhub.net/p/jenkins/commits/summary [2] https://www.openhub.net/p/hudson/commits/summary Looking at these numbers it seems to be time to fix bug 336262
(In reply to Matthias Sohn from comment #1) Basically, Hudson core change did not cause this issue. When we upgraded Spring security in Hudson 3.2.2, gerrit plugin was broken because Spring guys changed a package name. Looks like same thing happening in Hudson 3.3.2, when we moved to another version of Spring, the package name has changed again. We have two options - Keep all the plugins compatible to core but don't bother about outdated libraries in the core (like the Jenkins guys do, they still use Spring Security 1.x called acegi) - Take a trade off (plugins may break) and upgrade libraries in the core for a secure and more stable core Moving to Spring 3.1.2 in Hudson 3.3.2 is one such trade off because of major security issue in older version of Spring. We tried our best to modify plugins that uses Spring API after releasing 3.3.2. Some how we missed Gerrit plugin. I will compile the Gerrit plugin again with the changed package name and release a new version.
(In reply to Matthias Sohn from comment #4) Also according to this statistics, http://stats.jenkins-ci.org/jenkins-stats/svg/svgs.html Jenkins has more than 126,000 installations. While, Hudson has less than 15,000 installations. Main reason any one (especially Enterprises) still wants to use Hudson is because of its stability and security, which we tried to maintain with slow, steady and thoroughly QA-ed core development, released every 3-6 months (where as Jenkins is released every week). We have no plans to change that mode of development in the future also. So, if Eclipse wants to use fast paced Jenkins as its build tool, we at Hudson project won't feel offended :)
(In reply to Winston Prakash from comment #5) Sorry, I take that back. We did not upgrade Spring after Hudson 3.2.0. So Gerrit trigger plugin is 2.5.3-h-2 (released on Mar 26, 2015) is the correct version for Hudson 3.3.2 also. BTW, Gerrit Trigger 2.5.3-h-2 would not have worked with 3.0.1. That should be Gerrit Trigger 2.5.3-h-1. Just make sure you have Gerrit Trigger 2.5.3-h-2 installed for Hudson 3.2.0 and above
(In reply to Winston Prakash from comment #7) > (In reply to Winston Prakash from comment #5) > > Sorry, I take that back. We did not upgrade Spring after Hudson 3.2.0. So > Gerrit trigger plugin is 2.5.3-h-2 (released on Mar 26, 2015) is the correct > version for Hudson 3.3.2 also. > > BTW, Gerrit Trigger 2.5.3-h-2 would not have worked with 3.0.1. That should > be Gerrit Trigger 2.5.3-h-1. after Mikaël downgraded we have gerrit-trigger plugin 2.5.3-h-1. > Just make sure you have Gerrit Trigger 2.5.3-h-2 installed for Hudson 3.2.0 > and above AFAIR after the upgrade we had gerrit-trigger plugin 2.5.3-h2. Though it's possible I did a mistake during the upgrade. I will try it again. Where do I find the gerrit-trigger plugin 2.5.3-h2 ? Hudson 3.0.1-b2 which we now again use after the downgrade doesn't show it in Plugin Manager in tab "Updates" or "Available" and http://wiki.hudson-ci.org/display/HUDSON/Plugins currently shows an error message that Confluence isn't available due to some cluster failure
(In reply to Matthias Sohn from comment #8) Hudson 3.0.1 core has older version of Spring, so gerrit-trigger plugin 2.5.3-h-2 will not work. When you upgrade to Hudson 3.3.2, the initial setup page will automatically pickup gerrit-trigger plugin 2.5.3-h-2 and advise you to upgrade to that version. Hudson 3.0.1 uses http://hudson-ci.org/PluginCentral/site/3.0/ as Plugin Central, so its update center shows only version gerrit-trigger plugin 2.5.3-h-1. Where as Hudson 3.3.2 uses http://hudson-ci.org/PluginCentral/site/3.3.2/, so you will see gerrit-trigger plugin 2.5.3-h-2 in its update center. If you missed to upgrade the plugins during initial setup, you can upgrade from update center later. We recommend to upgrade plugins at initial setup page, in order to avoid Hudson breaking at startup. Using multiple Plugin Central helps us to upgrade core libraries, with out affecting older Hudson releases and its plugins.
FWIW, we recently upgraded the Sirius HIPP (https://hudson.eclipse.org/sirius) from Hudson 3.0.1-b2 to 3.3.2, and the version of the gerrit-trigger plug-in that we got after the upgrade (2.5.3-h-2) seems to work fine for us, including manual re-triggering of builds.
thanks for this hint, I will retry the upgrade of our HIPPs
I upgraded the EGit HIPP again and updated all plugins to the version recommended by the update center. The gerrit-trigger plugin is now version 2.5.3-h-2. I am unable to update the Dashboard from 2.5-h-1 (Installed) to 2.9.2-h-1. When trying to update that I get a green checkbox looking like this update succeeded. But after restarting Hudson it's back to the old version. And manual Gerrit trigger again hits the problem described above. No clue why this seems to work for other HIPPs but not for this one.
> And manual Gerrit trigger again hits the problem described above. No clue > why this seems to work for other HIPPs but not for this one. Indeed it does, also when retriggering a failed build: Caused by: java.lang.NoSuchMethodError: hudson.model.Hudson.getAuthentication()Lorg/springframework/security/Authentication; at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritUserCause.<init>(GerritUserCause.java:93) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.retriggerThisBuild(GerritTrigger.java:551) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.RetriggerAction.doIndex(RetriggerAction.java:144) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:274) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:141) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:80) at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:140) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:566) ... 62 more Unfortunately, we have a few unstable test cases in our test suite (yes, tracking those down and fixing them is on my to-do list), so not being able to retrigger is a nuisance and forces me to upload new patch sets to retrigger.
(In reply to Thomas Wolf from comment #13) > > And manual Gerrit trigger again hits the problem described above. No clue > > why this seems to work for other HIPPs but not for this one. > > Indeed it does, also when retriggering a failed build: > > Caused by: java.lang.NoSuchMethodError: > hudson.model.Hudson.getAuthentication()Lorg/springframework/security/ > Authentication; > at > com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritUserCause. > <init>(GerritUserCause.java:93) > at ... > Unfortunately, we have a few unstable test cases in our test suite (yes, > tracking those down and fixing them is on my to-do list), so not being able > to retrigger is a nuisance and forces me to upload new patch sets to > retrigger. I requested rollback of the upgrade in https://bugs.eclipse.org/bugs/show_bug.cgi?id=484915#c6