java.lang.NullPointerException

Atlassian JIRA | Matheus Fernandes | 3 years 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. +Steps to Reproduce:+ # Install JIRA Service Desk; # Create a Project through JIRA Service Desk; # Disable or Uninstall JIRA Service Desk. h3. +Expected Behavior:+ JIRA would hide/remove any configuration regarding JIRA Service Desk, and would continue to run normally. h3. +Actual Behavior:+ * JIRA's dashboards stop working; * It is not possible to log in but through login.jsp; * Accessing a project is not possible; * Trying to view the Permission tab through the project created throws an error. ---- h3. +Workaround+ *+Option 1:+* Reinstall/Re-enable JIRA Service Desk. *+Option 2:+* # If unable to log in, access JIRA through http://<jira-address>/login.jsp # Navigate to *Administration » Issues » Permission Scheme*; # Delete "*• (Anyone)*" from all permissions in all permission schemes. *+Option 3:+* Delete these from the database using: {code:SQL| borderStyle=dashed| borderColor=#6A8EB3 |bgColor=#F8F8F8} DELETE FROM schemepermissions WHERE perm_type = 'sd.customer.portal.only'; {code} (!) If deleting through the database, please make sure to create a backup. Also, make sure to shutdown JIRA first, and restart it afterwards. ---- h4. +Notes:+ This seems to be happening because JIRA Service Desk does not remove or hide the *Service Desk Customer - Portal Access (Anyone)* permission, and when JIRA tries to load it the following is thrown in the screen: {noformat:borderStyle=dashed| borderColor=#6A8EB3 |bgColor=#F8F8F8} java.lang.NullPointerException at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemePermission(DefaultPermissionSchemeManager.java:499) at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasPermission(DefaultPermissionSchemeManager.java:467) at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemeAuthority(DefaultPermissionSchemeManager.java:393) {noformat} This also appears in the logs: {noformat:borderStyle=dashed| borderColor=#6A8EB3 |bgColor=#F8F8F8} 2014-02-14 14:37:39,773 http-bio-8080-exec-1 ERROR matheus 877x158x5 1fqd1vy 192.168.10.104 /rest/gadget/1.0/issueTable/jql [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service java.lang.NullPointerException at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.collectProjectTerms(DefaultPermissionQueryFactory.java:171) at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.getQuery(DefaultPermissionQueryFactory.java:68) at com.atlassian.jira.issue.search.parameters.lucene.PermissionsFilterGeneratorImpl.getQuery(PermissionsFilterGeneratorImpl.java:38) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getPermissionsFilter(LuceneSearchProvider.java:522) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHits(LuceneSearchProvider.java:281) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:414) {noformat}

    Atlassian JIRA | 3 years ago | Matheus Fernandes
    java.lang.NullPointerException
  2. 0

    h3. +Steps to Reproduce:+ # Install JIRA Service Desk; # Create a Project through JIRA Service Desk; # Disable or Uninstall JIRA Service Desk. h3. +Expected Behavior:+ JIRA would hide/remove any configuration regarding JIRA Service Desk, and would continue to run normally. h3. +Actual Behavior:+ * JIRA's dashboards stop working; * It is not possible to log in but through login.jsp; * Accessing a project is not possible; * Trying to view the Permission tab through the project created throws an error. ---- h3. +Workaround+ *+Option 1:+* Reinstall/Re-enable JIRA Service Desk. *+Option 2:+* # If unable to log in, access JIRA through http://<jira-address>/login.jsp # Navigate to *Administration » Issues » Permission Scheme*; # Delete "*• (Anyone)*" from all permissions in all permission schemes. *+Option 3:+* Delete these from the database using: {code:SQL| borderStyle=dashed| borderColor=#6A8EB3 |bgColor=#F8F8F8} DELETE FROM schemepermissions WHERE perm_type = 'sd.customer.portal.only'; {code} (!) If deleting through the database, please make sure to create a backup. Also, make sure to shutdown JIRA first, and restart it afterwards. ---- h4. +Notes:+ This seems to be happening because JIRA Service Desk does not remove or hide the *Service Desk Customer - Portal Access (Anyone)* permission, and when JIRA tries to load it the following is thrown in the screen: {noformat:borderStyle=dashed| borderColor=#6A8EB3 |bgColor=#F8F8F8} java.lang.NullPointerException at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemePermission(DefaultPermissionSchemeManager.java:499) at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasPermission(DefaultPermissionSchemeManager.java:467) at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemeAuthority(DefaultPermissionSchemeManager.java:393) {noformat} This also appears in the logs: {noformat:borderStyle=dashed| borderColor=#6A8EB3 |bgColor=#F8F8F8} 2014-02-14 14:37:39,773 http-bio-8080-exec-1 ERROR matheus 877x158x5 1fqd1vy 192.168.10.104 /rest/gadget/1.0/issueTable/jql [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service java.lang.NullPointerException at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.collectProjectTerms(DefaultPermissionQueryFactory.java:171) at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.getQuery(DefaultPermissionQueryFactory.java:68) at com.atlassian.jira.issue.search.parameters.lucene.PermissionsFilterGeneratorImpl.getQuery(PermissionsFilterGeneratorImpl.java:38) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getPermissionsFilter(LuceneSearchProvider.java:522) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHits(LuceneSearchProvider.java:281) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:414) {noformat}

    Atlassian JIRA | 3 years ago | Matheus Fernandes
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemePermission()
    2. com.atlassian.jira
      DefaultPermissionSchemeManager.hasSchemeAuthority
      1. com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemePermission(DefaultPermissionSchemeManager.java:499)
      2. com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasPermission(DefaultPermissionSchemeManager.java:467)
      3. com.atlassian.jira.permission.DefaultPermissionSchemeManager.hasSchemeAuthority(DefaultPermissionSchemeManager.java:393)
      3 frames