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

jira-trigger-plugin fails to trigger job and throws error

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • jira-trigger-plugin
    • None
    • - Ubuntu 18.04
      - Jenkins 2.60.3
      - jira-trigger plugin 0.5.1

      My job does not get triggered and I see the following error in my Jenkins logs as I'm transitioning my issue from "QA" to "Done". Triggers from other transitions work just fine.

      Feel free to ask for further information.

      Error while serving http://jenkins.company.com/jira-trigger-webhook-receiver/Error while serving http://jenkins.company.com/jira-trigger-webhook-receiver/org.codehaus.jettison.json.JSONException: JSONObject["description"] not found. at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360) at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:487) at com.atlassian.jira.rest.client.internal.json.StatusJsonParser.parse(StatusJsonParser.java:31) at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:244) at com.atlassian.jira.rest.client.internal.json.IssueJsonParser$parse.call(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.WebhookChangelogEventJsonParser.parse(WebhookChangelogEventJsonParser.groovy:33) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.WebhookChangelogEventJsonParser$parse.call(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook.processEvent(JiraWebhook.groovy:62) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook$processEvent.callCurrent(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook.doIndex(JiraWebhook.groovy:50) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)Caused: java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347) 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:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) 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:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at javax.servlet.FilterChain$doFilter.call(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.ExceptionLoggingFilter.doFilter(ExceptionLoggingFilter.groovy:29) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at javax.servlet.FilterChain$doFilter.call(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhookCrumbExclusion.process(JiraWebhookCrumbExclusion.groovy:22) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:58) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) 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:135) 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:92) 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:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) 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:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
      

          [JENKINS-53794] jira-trigger-plugin fails to trigger job and throws error

          Usama Tariq added a comment -

          Hi, I consulted with Jira cloud team, they temporarily disabled a feature flag that enables that on my instance which causes automation. After that auto trigger plugin works fine. But they will remove the usernames in next month before that we need to move to account ID instead of username. 
          If anybody know how to use account ID please share the info. 

          Usama Tariq added a comment - Hi, I consulted with Jira cloud team, they  temporarily  disabled a feature flag that enables that on my instance which causes automation. After that auto trigger plugin works fine. But they will  remove the usernames  in next month before that we need to move to account ID instead of username.  If anybody know how to use account ID please share the info. 

          Stefan Cordes added a comment - - edited

          Hi,

          looks like the "jira-rest-java-client" will be prepared for "accountId": 

          JRJC-240: Added support for accountId.

          But that still needs to be merged (will probably a 

                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-rest-java-client-api</artifactId>
                <version>5.1.7</version>
          

          but in comparison to the 5.0.4 version there are some more changes:
          (e.g. import static com.atlassian.util.concurrent.Promises where groupId changed from com.atlassian.util.concurrent to io.atlassian.util.concurrent and dependency is no longer available transitive)

          Stefan Cordes added a comment - - edited Hi, looks like the "jira-rest-java-client" will be prepared for "accountId":  JRJC-240: Added support for accountId. But that still needs to be merged (will probably a  <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-api</artifactId> <version>5.1.7</version> but in comparison to the 5.0.4 version there are some more changes: (e.g. import static com.atlassian.util.concurrent.Promises where groupId changed from com.atlassian.util.concurrent to io.atlassian.util.concurrent and dependency is no longer available transitive)

          Matej Dro added a comment -

          This PR has not been merged since September. I don't think waiting for them to finally merge is a good solution.

          Would forking rest java client be a good idea?

          Matej Dro added a comment - This PR has not been merged since September. I don't think waiting for them to finally merge is a good solution. Would forking rest java client be a good idea?

          Stefan Cordes added a comment - - edited

          Merged pull request
          Merged in master (pull request #93)

          78059d9
          Jakub Sławiński
          18 minutes ago

          https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93

           

          Due to "JRJC-240: Bump plugin version to 5.2.0-SNAPSHOT" it looks like next version will be 5.2.0 and not 5.1.7.

          Stefan Cordes added a comment - - edited Merged pull request Merged in master (pull request #93) 78059d9 Jakub Sławiński 18 minutes ago https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93   Due to "JRJC-240: Bump plugin version to 5.2.0-SNAPSHOT" it looks like next version will be 5.2.0 and not 5.1.7.

          Matej Dro added a comment -

          I stand corrected.

          Matej Dro added a comment - I stand corrected.

          Stefan Cordes added a comment -

          5.2.0 is release, see https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid#comment-137009716

          Kamil Cichy commented on pull request #93:
          JRJC-240: Added support for accountId.

          Hello everyone,

          First of all I’m sorry it took so long to merge this PR. This is because this plugin is not supported. It means nobody is watching the PR queue and we don’t have any time budgeted to work on this. You should really thank @Andy Heinzer for nudging us to merge it 

          I reviewed the code to ensure it was backwards-compatible. Then I had to do some extra work to fix the CI for this plugin (it’s been broken since 8.4.0). Only then I was able to release it (the second attempt was successful). I’m only writing this to justify our inability to support this plugin properly. What seems to be a single “merge” click was in fact a couple of hours of work.

          Anyway, this PR is merged, plugin version 5.2.0 has been released. Hopefully better late than ever.

          Kamil
          Jira Server and DC developer

           

          Stefan Cordes added a comment - 5.2.0 is release, see  https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/93/jrjc-240-added-support-for-accountid#comment-137009716 Kamil Cichy commented on pull request #93: JRJC-240: Added support for accountId. Hello everyone, First of all I’m sorry it took so long to merge this PR. This is because this plugin is not supported. It means nobody is watching the PR queue and we don’t have any time budgeted to work on this. You should really thank @Andy Heinzer for nudging us to merge it  I reviewed the code to ensure it was backwards-compatible. Then I had to do some extra work to fix the CI for this plugin (it’s been broken since 8.4.0). Only then I was able to release it (the second attempt was successful). I’m only writing this to justify our inability to support this plugin properly. What seems to be a single “merge” click was in fact a couple of hours of work. Anyway, this PR is merged, plugin version 5.2.0 has been released. Hopefully better late than ever. Kamil Jira Server and DC developer  

          Wisen Tanasa added a comment -

          Thank you for chasing it up with JRJC client sc_rsc. Would you be interested to file a PR? I saw in the JRJC PR that you've made a code change that will make jira-trigger-plugin back to work again. Thanks!

          Wisen Tanasa added a comment - Thank you for chasing it up with JRJC client sc_rsc . Would you be interested to file a PR? I saw in the JRJC PR that you've made a code change that will make jira-trigger-plugin back to work again. Thanks!

          Usama Tariq added a comment -

          sc_rsc,
          Please suggest the solution for following ticket: https://issues.jenkins-ci.org/browse/JENKINS-61184

           

          Regards

          Usama Tariq added a comment - sc_rsc , Please suggest the solution for following ticket:  https://issues.jenkins-ci.org/browse/JENKINS-61184   Regards

          Stefan Cordes added a comment -

          As JENKINS-61184 was marked as duplicate of JENKINS-58987 I placed the comment there.

          Stefan Cordes added a comment - As JENKINS-61184  was marked as duplicate of  JENKINS-58987 I placed the comment there.

          Usama Tariq added a comment -

          Hi sc_rsc,

          Please let me know how to submit a pull request with a fix for Jira-trigger plugin ?

          Usama Tariq added a comment - Hi sc_rsc , Please let me know how to submit a pull request with a fix for Jira-trigger plugin ?

            ceilfors Wisen Tanasa
            brennerm Max Brenner
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: