ClassCastException when using the "Show Empty Rows" option

Issue #825 resolved
Nicolas Zastavni created an issue

When trying to use the "Show Empty Rows" option to show all jiras in epics related to a given filter (not only the one for which there are encoded hours), the page redirect to a 500 response.

In the log, the following error is present:

2016-04-12 15:01:27,760 http-nio-8095-exec-22 ERROR      [o.a.c.c.C.[.[localhost].[/jira].[action]] Servlet.service() for servlet [action] in context with path [/jira] threw exception [java.lang.ClassCastException: com.atlassian.jira.user.DelegatingApplicationUser cannot be cast to java.lang.Comparable] with root cause
java.lang.ClassCastException: com.atlassian.jira.user.DelegatingApplicationUser cannot be cast to java.lang.Comparable
    at java.util.TreeMap.compare(TreeMap.java:1290)
    at java.util.TreeMap.put(TreeMap.java:538)
    at java.util.TreeSet.add(TreeSet.java:255)
    at jira.plugin.report.timesheet.TimesheetService.addRoleUser(TimesheetService.java:607)
    at jira.plugin.report.timesheet.TimesheetService.projectUsers(TimesheetService.java:585)
    at jira.plugin.report.timesheet.TimesheetService.addEmptyUsers(TimesheetService.java:518)
    at jira.plugin.report.timesheet.TimesheetService.postProcess(TimesheetService.java:359)
    at jira.plugin.report.timesheet.TimesheetService.postProcess(TimesheetService.java:64)
    at jira.plugin.report.timesheet.TimeBaseService.getTimeSpents(TimeBaseService.java:355)
    at com.fdu.jira.plugin.report.timesheet.TimeSheet.generateReport(TimeSheet.java:88)
    at com.fdu.jira.plugin.report.AbstractTimebaseReport.generateReportHtml(AbstractTimebaseReport.java:103)
    at com.atlassian.jira.web.action.browser.ConfigureReport.doExecute(ConfigureReport.java:132)
    ... 1 filtered
    at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
    ... 7 filtered
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    ... 50 filtered
    at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
    ... 151 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)

Comments (10)

  1. Marco Baldelli

    Hi there, I'm getting the same error with Show Empty Rows flag set (Project Pivot report). I do not remember my original version, but I found this issue and upgraded to 3.0.5.3 (Jira 7.1.1) but the error is still there.

    Thanks

    2016-07-21 11:35:15,879 http-nio-8080-exec-10 ERROR      [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [java.lang.ClassCastException: com.atlassian.jira.user.DelegatingApplicationUser cannot be cast to java.lang.Comparable] with root cause
    java.lang.ClassCastException: com.atlassian.jira.user.DelegatingApplicationUser cannot be cast to java.lang.Comparable
        at java.util.TreeMap.compare(TreeMap.java:1290)
        at java.util.TreeMap.put(TreeMap.java:538)
        at java.util.TreeSet.add(TreeSet.java:255)
        at jira.plugin.report.timesheet.TimeBaseService.addRoleUser(TimeBaseService.java:579)
        at jira.plugin.report.timesheet.TimeBaseService.projectUsers(TimeBaseService.java:557)
        at jira.plugin.report.timesheet.TimeBaseService.addEmptyUsers(TimeBaseService.java:518)
        at jira.plugin.report.timesheet.TimeBaseService.postProcess(TimeBaseService.java:429)
        at jira.plugin.report.timesheet.TimeBaseService.getTimeSpents(TimeBaseService.java:370)
    
  2. Andriy Zhdanov

    Hi Marco,

    I can't seem reproduce it. Could you please provide screenshot for gadget or report configuration that causes the problem?

    Thank you.

  3. Marco Baldelli

    Hi Andriy, I currently don't have access to the instance so I can't send you screenshots. Scenario is very simple: I'm using Project Pivot Report: if I don't set any field but that one, it is ok (but it is a bit weird, because I can only see a few users). Then I configured it again adding a project, and it breaks. The strange behaviour I noticed later is that if I create the same report from gadget I can see it correctly even if I set Show Empty Rows to true, and then if I click "Details" the plugin will bring me to the Project Pivot Report page and everything seems to work.

    Any idea?

  4. Marco Baldelli

    Hi Andriy, just came back from holidays: I'll download and install the plugin as soon as i can! Thanks, Marco

  5. Log in to comment