com.atlassian.jira.util.dbc.Assertions$NullArgumentException: searchRequest should not be null!

Atlassian JIRA | Jamie Georgeson | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Summary Attempting to view a report configured for a project that does not exist causes the server to 500. The expected behaviour is to redirect back to the configure report form with an error message (as is the case if you try to view a restricted project as an anonymous user). This shouldn't occur when users navigate to a report through the configure screen, but may occur when users navigate to reports through bookmarks or shared links that go directly to the result. h3. Steps to Reproduce # Configure an Average Age report for an existing project and navigate to the formatted report (substitute Average Age report for any report that has a project picker). # Manually change the "projectOrFilterId" URL parameter to a project id that does not exist on the instance (e.g projectOrFilterId=project-99999). !change-project-id-to-invalid.png|thumbnail! h3. Expected Results The user is redirected back to the configure report form with a "project does not exist" error message. !expected-outcome.png|thumbnail! h3. Actual Results A 500 error. !500-when-no-project-found.png|thumbnail! The below exception is thrown in the atlassian-jira.log file: {noformat} com.atlassian.jira.util.dbc.Assertions$NullArgumentException: searchRequest should not be null! at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:25) at com.atlassian.jira.charts.AverageAgeChart.generateChartInternal(AverageAgeChart.java:69) at com.atlassian.jira.charts.AverageAgeChart.generateInlineChart(AverageAgeChart.java:65) at com.atlassian.jira.charts.DefaultChartFactory.generateAverageAgeChart(DefaultChartFactory.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy165.generateAverageAgeChart(Unknown Source) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy1958.generateAverageAgeChart(Unknown Source) at com.atlassian.jira.plugin.corereports.charts.report.AverageAgeReport.generateReportHtml(AverageAgeReport.java:71) at com.atlassian.jira.plugin.corereports.web.action.ConfigureReport.doExecute(ConfigureReport.java:167) ... 1 filtered at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ... 49 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62) ... 7 filtered at com.atlassian.jira.plugin.corereports.filters.ReportKeyRewriter.doFilter(ReportKeyRewriter.java:48) ... 4 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 58 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74) ... 36 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 20 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 29 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 27 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) {noformat}

    Atlassian JIRA | 9 months ago | Jamie Georgeson
    com.atlassian.jira.util.dbc.Assertions$NullArgumentException: searchRequest should not be null!

    Root Cause Analysis

    1. com.atlassian.jira.util.dbc.Assertions$NullArgumentException

      searchRequest should not be null!

      at com.atlassian.jira.util.dbc.Assertions.notNull()
    2. com.atlassian.jira
      DefaultChartFactory.generateAverageAgeChart
      1. com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:25)
      2. com.atlassian.jira.charts.AverageAgeChart.generateChartInternal(AverageAgeChart.java:69)
      3. com.atlassian.jira.charts.AverageAgeChart.generateInlineChart(AverageAgeChart.java:65)
      4. com.atlassian.jira.charts.DefaultChartFactory.generateAverageAgeChart(DefaultChartFactory.java:101)
      4 frames
    3. Java RT
      NativeMethodAccessorImpl.invoke0
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      1 frame