Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-60866

Calling AbstractJiraContextProvider.getContextMap() throws ClassCastException

    XMLWordPrintable

Details

    Description

      A ClassCastException will be thrown when a call to AbstractJiraContextProvider.getContextMap() is made and the user is logged in as BridgedDirectoryUser (Authenticated by LDAP).

      Here's a stacktrace from the Jira Gerrit Plugin where this exception is raised as soon as Jira tries to fetch Changesets for a ticket.

      [c.a.g.w.r.issue.thirdpartytabs.ThirdPartyTabModelFactory] Unable to load third party tab for com.meetme.plugins.jira.gerrit-plugin:gerrit-reviews-agile-panel
      java.lang.ClassCastException: com.atlassian.jira.user.BridgedDirectoryUser cannot be cast to com.atlassian.jira.user.ApplicationUser
      at com.atlassian.jira.plugin.webfragment.contextproviders.AbstractJiraContextProvider.getContextMap(AbstractJiraContextProvider.java:20)
      at com.atlassian.plugin.web.model.AbstractWebItem.getContextMap(AbstractWebItem.java:30)
      at com.atlassian.plugin.web.model.DefaultWebLabel.getDisplayableLabel(DefaultWebLabel.java:55)
      at com.atlassian.greenhopper.web.rapid.issue.thirdpartytabs.ThirdPartyTabModelFactory.buildThirdPartyTab(ThirdPartyTabModelFactory.java:84)
      at com.atlassian.greenhopper.web.rapid.issue.thirdpartytabs.ThirdPartyTabModelFactory.buildThirdPartyTabs(ThirdPartyTabModelFactory.java:65)
      at com.atlassian.greenhopper.web.rapid.issue.thirdpartytabs.ThirdPartyTabModelFactory.createModel(ThirdPartyTabModelFactory.java:52)
      at com.atlassian.greenhopper.web.rapid.issue.IssueEntryFactory.buildViewEntry(IssueEntryFactory.java:409)
      at com.atlassian.greenhopper.web.rapid.issue.IssueResource$1.call(IssueResource.java:136)
      at com.atlassian.greenhopper.web.rapid.issue.IssueResource$1.call(IssueResource.java:106)
      at com.atlassian.greenhopper.web.util.RestCall.response(RestCall.java:42)
      at com.atlassian.greenhopper.web.AbstractResource.createResponse(AbstractResource.java:114)
      at com.atlassian.greenhopper.web.AbstractResource.response(AbstractResource.java:94)
      at com.atlassian.greenhopper.web.rapid.issue.IssueResource.getPageData(IssueResource.java:105)
      ... 2 filtered
      at java.lang.reflect.Method.invoke(Method.java:497)
      ... 19 filtered
      at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)
      ... 1 filtered
      at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)
      ... 101 filtered
      at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40)
      ... 73 filtered
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            541c309f-b7c2-45d3-82bf-1eaa4305a9e7 Deleted Account (Inactive)
            Votes:
            9 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: