Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23194

NoSuchMethod when configuring mergeRequest Builder

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When I try to configure the Gitlab Merge Request builder, I get the error below.

      I tried the following crontab lines:

      H/5 * * * *
      */5 * * * *
      5 * * * *
      
      javax.servlet.ServletException: java.lang.NoSuchMethodError: hudson.triggers.TimerTrigger$DescriptorImpl.doCheckSpec(Ljava/lang/String;)Lhudson/util/FormValidation;
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:778)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
      	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:89)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at com.marvelution.jenkins.plugins.jira.filter.OAuthServletFilter.doFilter(OAuthServletFilter.java:70)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at com.marvelution.jenkins.plugins.jira.filter.StreamsServletFilter.doFilter(StreamsServletFilter.java:84)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at com.marvelution.jenkins.plugins.jira.filter.ApplinksServletFilter.doFilter(ApplinksServletFilter.java:91)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at com.marvelution.jenkins.plugins.jira.oauth.OAuthFilter.doFilter(OAuthFilter.java:77)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:767)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:326)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      Caused by: java.lang.NoSuchMethodError: hudson.triggers.TimerTrigger$DescriptorImpl.doCheckSpec(Ljava/lang/String;)Lhudson/util/FormValidation;
      	at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger$GitlabBuildTriggerDescriptor.doCheckCron(GitlabBuildTrigger.java:183)
      	at sun.reflect.GeneratedMethodAccessor878.invoke(Unknown Source)
      	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:298)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
      	... 72 more
      

        Attachments

          Issue Links

            Activity

            der_do Udo Waechter created issue -
            Hide
            der_do Udo Waechter added a comment -

            current version (1.2.1 with 1.1.4 of gitlab-api) works fine.

            Show
            der_do Udo Waechter added a comment - current version (1.2.1 with 1.1.4 of gitlab-api) works fine.
            Hide
            recampbell Ryan Campbell added a comment -

            JENKINS-23194 captures the larger impact, which helps indicate the severity.

            Show
            recampbell Ryan Campbell added a comment - JENKINS-23194 captures the larger impact, which helps indicate the severity.
            recampbell Ryan Campbell made changes -
            Field Original Value New Value
            Link This issue duplicates JENKINS-28779 [ JENKINS-28779 ]
            recampbell Ryan Campbell made changes -
            Link This issue is related to JENKINS-22550 [ JENKINS-22550 ]
            Hide
            danielbeck Daniel Beck added a comment -

            I think something like the following would fix the issue:

            diff --git a/src/main/java/org/jenkinsci/plugins/gitlab/GitlabBuildTrigger.java b/src/main/java/org/jenkinsci/plugins/gitlab/GitlabBuildTrigger.java
            index 81c13cc..a8688ca 100644
            --- a/src/main/java/org/jenkinsci/plugins/gitlab/GitlabBuildTrigger.java
            +++ b/src/main/java/org/jenkinsci/plugins/gitlab/GitlabBuildTrigger.java
            @@ -174,8 +174,8 @@ public final class GitlabBuildTrigger extends Trigger<AbstractProject<?, ?>> {
                         return super.configure(req, formData);
                     }
             
            -        public FormValidation doCheckCron(@QueryParameter String value){
            -            return (new TimerTrigger.DescriptorImpl().doCheckSpec(value));
            +        public FormValidation doCheckCron(@QueryParameter String value, @AncestorInPath Item item){
            +            return (new TimerTrigger.DescriptorImpl().doCheckSpec(value, item));
                     }
             
                     public FormValidation doCheckGitlabHostUrl(@QueryParameter String value) {
            

            Unfortunately, the plugin doesn't even build from current master:

            [ERROR] Failed to execute goal on project gitlab-merge-request-jenkins: Could not resolve dependencies for project com.switchfly:gitlab-merge-request-jenkins:hpi:1.1.2-SNAPSHOT: Could not find artifact org.gitlab:java-gitlab-api:jar:1.1.1 in repo.jenkins-ci.org (http://repo.jenkins-ci.org/public/) -> [Help 1]

            Show
            danielbeck Daniel Beck added a comment - I think something like the following would fix the issue: diff --git a/src/main/java/org/jenkinsci/plugins/gitlab/GitlabBuildTrigger.java b/src/main/java/org/jenkinsci/plugins/gitlab/GitlabBuildTrigger.java index 81c13cc..a8688ca 100644 --- a/src/main/java/org/jenkinsci/plugins/gitlab/GitlabBuildTrigger.java +++ b/src/main/java/org/jenkinsci/plugins/gitlab/GitlabBuildTrigger.java @@ -174,8 +174,8 @@ public final class GitlabBuildTrigger extends Trigger<AbstractProject<?, ?>> { return super .configure(req, formData); } - public FormValidation doCheckCron(@QueryParameter String value){ - return ( new TimerTrigger.DescriptorImpl().doCheckSpec(value)); + public FormValidation doCheckCron(@QueryParameter String value, @AncestorInPath Item item){ + return ( new TimerTrigger.DescriptorImpl().doCheckSpec(value, item)); } public FormValidation doCheckGitlabHostUrl(@QueryParameter String value) { Unfortunately, the plugin doesn't even build from current master: [ERROR] Failed to execute goal on project gitlab-merge-request-jenkins: Could not resolve dependencies for project com.switchfly:gitlab-merge-request-jenkins:hpi:1.1.2-SNAPSHOT: Could not find artifact org.gitlab:java-gitlab-api:jar:1.1.1 in repo.jenkins-ci.org ( http://repo.jenkins-ci.org/public/ ) -> [Help 1]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 155742 ] JNJira + In-Review [ 179107 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                der_do Udo Waechter
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: