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

JIRA Pie Chart Gadget Doesn't Display For Anonymous Users

XMLWordPrintable

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      This is a stack trace thats thrown when an anonymous user tries to render the JIRA dashboard with pie chart gadget.

      2013-05-30 13:30:43.500083500 2013-05-30 13:30:43,498 TP-Processor12 ERROR anonymous 810x515x1 y4o4g1 12.250.157.102,131.103.29.65 /rest/gadget/1.0/piechart/generate [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
      2013-05-30 13:30:43.500086500 java.lang.NullPointerException
      2013-05-30 13:30:43.500086500 	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
      2013-05-30 13:30:43.500087500 	at com.atlassian.jira.charts.piechart.PieChartUrlGeneratorFactory.<init>(PieChartUrlGeneratorFactory.java:41)
      2013-05-30 13:30:43.500097500 	at com.atlassian.jira.charts.PieChart.generateChart(PieChart.java:89)
      2013-05-30 13:30:43.500098500 	at com.atlassian.jira.charts.DefaultChartFactory.generatePieChart(DefaultChartFactory.java:91)
      2013-05-30 13:30:43.500099500 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2013-05-30 13:30:43.500099500 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2013-05-30 13:30:43.500101500 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2013-05-30 13:30:43.500102500 	at java.lang.reflect.Method.invoke(Method.java:597)
      2013-05-30 13:30:43.500103500 	at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      2013-05-30 13:30:43.500108500 	at $Proxy453.generatePieChart(Unknown Source)
      2013-05-30 13:30:43.500109500 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2013-05-30 13:30:43.500109500 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2013-05-30 13:30:43.500110500 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2013-05-30 13:30:43.500113500 	at java.lang.reflect.Method.invoke(Method.java:597)
      2013-05-30 13:30:43.500113500 	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
      
      

      This is the location of the failure. It seems to that plug-in has to check in for a user even as an anonymous user.

      from https://stash.atlassian.com/projects/JIRA/repos/jira/browse/jira-components/jira-core/src/main/java/com/atlassian/jira/charts/piechart/PieChartUrlGeneratorFactory.java -

          public PieChartUrlGeneratorFactory(SearchService searchService, ApplicationProperties applicationProperties, SearchRequestAppender searchRequestAppender, User remoteUser, SearchRequest baseSearchRequest)
          {
              this.searchService = Assertions.notNull(searchService);
              this.searchRequestAppender = Assertions.notNull(searchRequestAppender);
              this.remoteUser = Assertions.notNull(remoteUser);                          <------ null pointer is here
              this.baseSearchRequest = Assertions.notNull(baseSearchRequest);
              velocityRequestContext = new DefaultVelocityRequestContextFactory(applicationProperties).getJiraVelocityRequestContext();
          }
      

              idick Ian Dick
              dmaye@atlassian.com David Maye
              Votes:
              46 Vote for this issue
              Watchers:
              54 Start watching this issue

                Created:
                Updated:
                Resolved: