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

Better error messages in case of an InvalidCacheLoadException when no Jira credentials are provided

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: jira-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.226
      OpenJdk 1.8
      CentOS Linux release 7.7.1908 (Core)
      Installed via YUM
      Plugins:
      Jira Plugin 3.0.13
    • Similar Issues:

      Description

      When not configuring any credentials but a URL for the Jira Plugin, it still tries to connect to the URL. This results in a lot of InvalidCacheLoadException

      2020-03-16 02:22:09.137+0000 [id=7306028]	WARNING	h.model.listeners.RunListener#report: RunListener failed
      com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader returned null for key UCS-154.
      	at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2383)
      	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2351)
      	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
      	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4764)
      	at hudson.plugins.jira.JiraSite.getIssue(JiraSite.java:873)
      	at hudson.plugins.jira.JiraJobAction.setAction(JiraJobAction.java:99)
      	at hudson.plugins.jira.JiraJobAction$RunListenerImpl.onStarted(JiraJobAction.java:130)
      	at hudson.plugins.jira.JiraJobAction$RunListenerImpl.onStarted(JiraJobAction.java:122)
      	at hudson.model.listeners.RunListener.fireStarted(RunListener.java:238)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:295)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:428)

      It will try to connect for every Jira KEY it finds. This can be a lot of exceptions.

      I know, that I should provide credentials if I intend to use the plugin. The real problem is that it was not easy to link this exception to the missing credentials. A nice error message would have been much better than some generic stack trace.

        Attachments

          Issue Links

            Activity

            Hide
            falcon benoit guerin added a comment -

            FYI I fix others of those exceptions in JENKINS-61098

            Show
            falcon benoit guerin added a comment - FYI I fix others of those exceptions in  JENKINS-61098
            Hide
            jenkinsjenkins Andreas Nusser added a comment -

            Got the okay from my employer and will try to provide a Pull Request the next days.

            Show
            jenkinsjenkins Andreas Nusser added a comment - Got the okay from my employer and will try to provide a Pull Request the next days.
            Hide
            warden Radek Antoniuk added a comment -

            Andreas Nusser indeed that makes sense, would you like to give it a shot and contribute with a Pull Request to add a logger?

            Show
            warden Radek Antoniuk added a comment - Andreas Nusser  indeed that makes sense, would you like to give it a shot and contribute with a Pull Request to add a logger?

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jenkinsjenkins Andreas Nusser
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: