Uploaded image for project: 'JIRA Server (including JIRA Core)'
  1. JIRA Server (including JIRA Core)
  2. JRASERVER-29164

Time Since Chart Throws 'An internal server error occurred when requesting resource.'

    XMLWordPrintable

    Details

    • Regular Expression:
      \s/rest/gadget/\d\.\d/timeSince/generate\s\[common\.error\.jersey\.ThrowableExceptionMapper\]\sUncaught\sexception\sthrown\sby\sREST\sservice\sjava\.lang\.IllegalArgumentException:\sYear\sconstructor:\syear\s.\d*.\soutside\svalid\srange\.

      Description

      Steps to reproduce:

      1. upgrade to JIRA 5.1 from a 4.x release, where x <= 3
      2. configure the Time Since Chart gadget to use Due Date in the "Date Field"
      3. save the gadget. Gadget throws 'An internal server error occurred when requesting resource.' and not saved

      In JIRA logs:

      2012-07-31 16:35:32,648 http-8282-13 ERROR admin 995x407x9 1v5ehb0 127.0.0.1 /rest/gadget/1.0/timeSince/generate [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
      java.lang.IllegalArgumentException: Year constructor: year (11950) outside valid range.
      	at org.jfree.data.time.Year.<init>(Year.java:116)
      	at org.jfree.data.time.Week.getYear(Week.java:235)
      	at org.jfree.data.time.Week.compareTo(Week.java:497)
      	at java.util.TreeMap.getEntry(TreeMap.java:328)
      	at java.util.TreeMap.get(TreeMap.java:255)
      	at com.atlassian.jira.charts.TimeSinceChart$GenericDateFieldIssuesHitCollector.incrementMap(TimeSinceChart.java:230)
      	at com.atlassian.jira.charts.TimeSinceChart$GenericDateFieldIssuesHitCollector.collect(TimeSinceChart.java:225)
      	at com.atlassian.jira.issue.statistics.util.DocumentHitCollector.collect(DocumentHitCollector.java:34)
      	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:575)
      	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:535)
      	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:323)
      	at com.atlassian.jira.index.DelegateSearcher.search(DelegateSearcher.java:160)
      	at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:245)
      	at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:104)
      	at com.atlassian.jira.charts.TimeSinceChart.generateChart(TimeSinceChart.java:99)
      	at com.atlassian.jira.charts.DefaultChartFactory.generateTimeSinceChart(DefaultChartFactory.java:133)
      	at sun.reflect.GeneratedMethodAccessor354.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      

      Root cause of the problem is Due Date value in the indexes is in the old format. Refer to screenshot DueDate.png

      The other date field like created and updated is correct. Refer to screenshot DateFormat.png

        Attachments

        1. 1.png
          2 kB
          Wendy Yi
        2. DateFormat.png
          266 kB
          Janet Albion
        3. DueDate.png
          268 kB
          Janet Albion
        4. Period.png
          206 kB
          Janet Albion
        5. TimeSinceChart.png
          31 kB
          Janet Albion

          Issue Links

            Activity

              People

              • Assignee:
                edalgliesh Eric Dalgliesh
                Reporter:
                jalbion Janet Albion
              • Votes:
                4 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: