Error while loading the Gadget/Jfree chart

XMLWordPrintable

    • 6.03

      We are upgraded JIRA from 5.2.10 to 6.3.15 and according to JIRA 6.3.15 API we have updated our custom plugins. But custom charts are not working and getting the below error message in logs when try to generate charts.

       ERROR: 2015-04-29 06:05:08,338 http-bio-443-exec-6 WARN mp255006 365x106857x1 19y1ab4 153.65.246.169 /charts [jira.charts.jfreechart.DisplayChartServlet] File not found, returning 404 (filename='jfreechart-onetime-494995438632480332.png') 
      Request URL: https://sdvl3jira001.td.teradata.com/jira/charts?filename="jfreechart-onetime-494995438632480332.png"
      File location: /data/jira/temp/
      

      When we check file name in "/data/jira/temp/" folder, file is present. We are using below code to retrieve the chart file. Could you please help us, what we are we wrong here.
      Below is the code snippet in gadget.xml:

      var uri = "__ATLASSIAN_BASE_URL__/rest/defectrest/1.0/drawchart?widthField="+gadgets.util.unescapeString(this.getPref("widthField"))
      					+"&heightField="+gadgets.util.unescapeString(this.getPref("heightField"))
                          +"&defectGoal1="+gadgets.util.unescapeString(this.getPref("defectGoal1"))
                          +"&defectGoal1Name="+gadgets.util.unescapeString(this.getPref("defectGoal1Name"))
                          +"&defectGoal2="+gadgets.util.unescapeString(this.getPref("defectGoal2"))
                          +"&defectGoal2Name="+gadgets.util.unescapeString(this.getPref("defectGoal2Name"))
                          +"&defectGoal3="+gadgets.util.unescapeString(this.getPref("defectGoal3"))
                          +"&defectGoal3Name="+gadgets.util.unescapeString(this.getPref("defectGoal3Name"))
                          +"&defectGoal4="+gadgets.util.unescapeString(this.getPref("defectGoal4"))
                          +"&defectGoal4Name="+gadgets.util.unescapeString(this.getPref("defectGoal4Name"))
                          +"&defectGoal5="+gadgets.util.unescapeString(this.getPref("defectGoal5"))
                          +"&defectGoal5Name="+gadgets.util.unescapeString(this.getPref("defectGoal5Name"))
                          +"&startDate="+gadgets.util.unescapeString(this.getPref("startDate"))
                          +"&endDate="+gadgets.util.unescapeString(this.getPref("endDate"))
                          +"&chartName="+gadgets.util.unescapeString(this.getPref("chartName"))
                          +"&filterId1="+gadgets.util.unescapeString(this.getPref("filterId1"))
                          +"&filterId2="+gadgets.util.unescapeString(this.getPref("filterId2"))
                          +"&filterId3="+gadgets.util.unescapeString(this.getPref("filterId3"))
                          +"&filterId4="+gadgets.util.unescapeString(this.getPref("filterId4"))
                          +"&filterId5="+gadgets.util.unescapeString(this.getPref("filterId5"))
                          +"&currentoutstanding="+gadgets.util.unescapeString(this.getPref("currentoutstanding"));
                                                           
      jQuery.ajax({
           url:    uri ,
           success: function(data) {
                                                                                                        
        var content = '';
            content += "<table class=\"grid maxWidth twodimensionstats\" height=\""+ht+"\">";
            content += "<tbody><tr><td>";
            content += "<img src=\"__ATLASSIAN_BASE_URL__/charts?filename="+data+".png\" border=\"0\">";
            content += "</td></tr></tbody></table>";
            gadget.getView().html(content);
            resize();
                                                                       
              },
          async:   false,
                             error: function(data) {
                                   alert('error');
                                  }
          });
                                                      
      

      PS: In "success: function(data)" the value of data is filename say "jfreechart-onetime-494995438632480332".
      Also in JIRA 5.2.10 the gadget used to work. And also we have modified the gadget code compatible to Jira6.3.15.

            Assignee:
            Unassigned
            Reporter:
            Peyyala Madhusudhana Rao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: