Error 500 while accesing Project list page

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

JIRA shows error 500 while accessing <JIRA-URL>/secure/project/BrowseProjects.jspa?s=view_projects

  • The following appears in the atlassian-jira.log
2018-08-01 08:48:07,940 http-nio-8080-exec-59 ERROR [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at com.atlassian.jira.web.action.browser.ProjectDataForArchivingCollector.lambda$getMapToUpdatedDate$0(ProjectDataForArchivingCollector.java:50)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1696)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.atlassian.jira.web.action.browser.ProjectDataForArchivingCollector.getMapToUpdatedDate(ProjectDataForArchivingCollector.java:50)
at com.atlassian.jira.web.action.browser.BrowseProjects$2.get(BrowseProjects.java:169)
at com.atlassian.jira.web.action.browser.BrowseProjects$2.get(BrowseProjects.java:153)
at com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:125)
at com.atlassian.jira.web.action.browser.BrowseProjects.doExecute(BrowseProjects.java:287)
... 1 filtered
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
... 7 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
... 48 filtered
at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62)
... 12 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:66)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
... 39 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 10 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)
... 26 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 24 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748
2018-08-01 08:48:08,025 http-nio-8080-exec-59 ERROR [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=b1ea82ae-3c6f-42d4-a86b-b4db64ca5a11, interpretedMsg=, cause=java.lang.NullPointerException, stacktrace=java.lang.NullPointerException
at com.atlassian.jira.web.action.browser.ProjectDataForArchivingCollector.lambda$getMapToUpdatedDate$0(ProjectDataForArchivingCollector.java:50) [classes/:?]
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321) [?:1.8.0_181]
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) [?:1.8.0_181]
at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1696) [?:1.8.0_181]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [?:1.8.0_181]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) [?:1.8.0_181]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) [?:1.8.0_181]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:1.8.0_181]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) [?:1.8.0_181]
at com.atlassian.jira.web.action.browser.ProjectDataForArchivingCollector.getMapToUpdatedDate(ProjectDataForArchivingCollector.java:50) [classes/:?]
at com.atlassian.jira.web.action.browser.BrowseProjects$2.get(BrowseProjects.java:169) [classes/:?]
at com.atlassian.jira.web.action.browser.BrowseProjects$2.get(BrowseProjects.java:153) [classes/:?]

Cause

The problem could be caused by some issues in JIRA which does not have issuetype associated with it.

Resolution

To resolve this issue administrator can either remove the issues without issuetype or set an issuetype for the issues affected by this problem.

To remove the issue(s):

  1. Backup your JIRA.
  2. Stop your JIRA.
  3. Identify the issues without issuetype by using the following SQL:

    select id from jiraissue where issuetype is null;
  4. Remove them from the database with the following queries:

    DELETE FROM jiraaction WHERE issueid in (<issue id from previous SQL>);
    DELETE FROM worklog WHERE issueid in (<issue id from previous SQL>);
    DELETE FROM changegroup WHERE issueid in (<issue id from previous SQL>);
    DELETE FROM nodeassociation WHERE SOURCE_NODE_ID in (<issue id from previous SQL>) AND SOURCE_NODE_ENTITY='Issue';
    DELETE FROM userassociation WHERE SINK_NODE_ID in (<issue id from previous SQL>) AND SINK_NODE_ENTITY='Issue';
    DELETE FROM customfieldvalue WHERE ISSUE in (<issue id from previous SQL>);
    DELETE FROM jiraissue WHERE ID in (<issue id from previous SQL>);
    DELETE FROM notificationinstance WHERE SOURCE in (<issue id from previous SQL>);
  5. Restart your JIRA and perform full re-index


To set an issuetype for the issue(s):

  1. Backup your JIRA.
  2. Stop your JIRA.
  3. Identify the issues without issuetype by using the following SQL:

    select * from jiraissue where issuetype is null;
  4. Find the preferred issuetype that you would like to set using the following SQL query:

    select id, pname from issuetype;
  5. Take a note of the id of the issuetype that you would like to set for your affected issues and run the following SQL to set the issuetype:

    update jiraissue set issuetype = 'id-of-issuetype' where issuetype is null;
  6. Restart your JIRA and perform full re-index


Last modified on Oct 14, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.