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

URLTrigger Plugin doesn't work in jenkins 2.0 alpha 3 when using job type Pipeline

    XMLWordPrintable

Details

    Description

      When enabling the URLTrigger plugin with the Pipeline job type in jenkins 2.0 alpha 3 it gives the following stack trace when trying to save..

      javax.servlet.ServletException: java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.AbstractProject
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:134)
      at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:131)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:125)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      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 jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      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:171)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.AbstractProject
      at org.jenkinsci.lib.xtrigger.AbstractTrigger.getPollingNodeListRequiredNoWS(AbstractTrigger.java:361)
      at org.jenkinsci.lib.xtrigger.AbstractTrigger.getPollingNodeList(AbstractTrigger.java:347)
      at org.jenkinsci.lib.xtrigger.AbstractTrigger.getPollingNodesWithExecutors(AbstractTrigger.java:329)
      at org.jenkinsci.lib.xtrigger.AbstractTrigger.getPollingNode(AbstractTrigger.java:309)
      at org.jenkinsci.lib.xtrigger.AbstractTrigger.start(AbstractTrigger.java:84)
      at org.jenkinsci.lib.xtrigger.AbstractTrigger.start(AbstractTrigger.java:29)
      at org.jenkinsci.plugins.workflow.job.WorkflowJob.submit(WorkflowJob.java:186)
      at hudson.model.Job.doConfigSubmit(Job.java:1228)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
      at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52)
      at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      ... 66 more

      Attachments

        Issue Links

          Activity

            ccoleman Curt Coleman added a comment -

            basil, from recent comments on JENKINS-42614, it sounds like they think most of the work has been done already. Is there still something in that Epic to be done that URL Trigger is dependent on?

            ccoleman Curt Coleman added a comment - basil , from recent comments on JENKINS-42614 , it sounds like they think most of the work has been done already. Is there still something in that Epic to be done that URL Trigger is dependent on?
            basil Basil Crow added a comment -

            ccoleman, I was able to re-add the EnvInject functionality that I had ripped out and compile the plugin, but I haven't tested the result or posted my changes on GitHub yet. I will probably get to that within the next 2-4 weeks. When I do, I'll look into upstreaming the changes.

            basil Basil Crow added a comment - ccoleman , I was able to re-add the EnvInject functionality that I had ripped out and compile the plugin, but I haven't tested the result or posted my changes on GitHub yet. I will probably get to that within the next 2-4 weeks. When I do, I'll look into upstreaming the changes.
            basil Basil Crow added a comment -

            ccoleman, I finished testing my changes and have now posted two pull requests in order to have the fix integrated upstream. I am awaiting a reply from the maintainers regarding getting these pull requests.

            basil Basil Crow added a comment - ccoleman , I finished testing my changes and have now posted two pull requests in order to have the fix integrated upstream. I am awaiting a reply from the maintainers regarding getting these pull requests.
            basil Basil Crow added a comment -

            I discovered that this issue is a duplicate of JENKINS-27301 and the scope of work required to fix this is larger than I had originally anticipated. I'm afraid this will have to remain an open issue until someone has the time to write a more comprehensive fix.

            basil Basil Crow added a comment - I discovered that this issue is a duplicate of JENKINS-27301 and the scope of work required to fix this is larger than I had originally anticipated. I'm afraid this will have to remain an open issue until someone has the time to write a more comprehensive fix.
            ccoleman Curt Coleman added a comment -

            basil, I appreciate you making the effort. Given that the pull request for that other ticket appears to almost be approved, I guess there's still some hope this could be resolved in the not-too-distant-future.

            ccoleman Curt Coleman added a comment - basil , I appreciate you making the effort. Given that the pull request for that other ticket appears to almost be approved, I guess there's still some hope this could be resolved in the not-too-distant-future.

            People

              gbois Gregory Boissinot
              stevenarmstrong steven armstrong
              Votes:
              10 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: