java.lang.NullPointerException

Atlassian JIRA | Abdoulaye Kindy Diallo | 2 years ago
  1. 0

    {panel:title=Atlassian Status as of 11th July 2014|borderStyle=solid|borderColor=#3C78B5| titleBGColor=#3C78B5| bgColor=#E7F4FA} Dear Customers, The JIRA Agile Development and Support teams are currently working on resolving this issue at a high priority. This issue was initially found in JIRA Agile 6.4.0+, the specific cause for this issue found and was resolved in the JIRA Agile 6.4.2 release. It has been however found following to this release that subsequent similar issues have been seen where is it not possible to rank issues in JIRA Agile. It is understood that the cause of this issue after the 6.4.2 release is different to the initial bug, and that it may have something to do with specific database configuration or data being in an inconsistent state due to the previous bug. One of these issues is exposed within the Oracle Database server and has been logged in the following bug: GHS-10910 If customers have run into this problem and are not currently on 6.4.2 it is recommended that they immediately upgrade to the latest version of JIRA Agile as this should resolve their problems. If the upgrade does not fix the problem customers will need to trigger a *balance*, details on how to perform this are specified below. If the *balance* does not work and you are on an Oracle Database please follow the steps below entitled *Upgrade Notes for JIRA Agile 6.4.2*, it is possible you have run into GHS-10910 please follow that for updates. In other cases please contact https://support.atlassian.com, if customers urgently require their JIRA Agile to be functional again please follow the *Rollback the plugin* steps below. Cheers, Michael Andreacchio JIRA Support Team Lead {panel} Issues are not able to be ranked in JIRA Agile 6.4.x. Basically, when you try to rank the issues you are hitting into this error message: bq.JIRA Agile cannot execute the rank operation. This board has recently been configured to use the Rank field. The system must be re-indexed before you can rank issues. Ask your administrator to perform a manual re-index. The following error is thrown in the {{atlassian-jira.log}} {code} 2014-07-02 09:11:26,257 http-bio-8080-exec-97 WARN xxxxxx 551x7454x6 1hz4f54 xxx.xxx.10.xxx,192.xxx.1.12 /secure/QuickCreateIssue.jspa [greenhopper.customfield.lexorank.LexoRankIndexer] Could not retrieve LexoRank value for issue[id=123317]. Indexing max LexoRank value instead. 2014-07-02 09:11:26,797 http-bio-8080-exec-98 WARN xxxxxx 551x7444x3 1xhugqi xxx.xxx.0.xxx,xxx.xxx.1.xxx /browse/TTPSTN-1054 [greenhopper.customfield.lexorank.LexoRankCFType] Unable to retrieve rank for field [12070] and issue [122761] 2014-07-02 09:11:26,801 http-bio-8080-exec-98 WARN xxxxxx 551x7444x3 1xhugqi xxx.156.0.xxx,192.xxx.1.12 /browse/TTPSTN-1054 [greenhopper.customfield.lexorank.LexoRankCFType] gh.lexorank.service.error.retrytimeout 2014-07-02 09:11:26,802 http-bio-8080-exec-98 ERROR xxxxxx 551x7444x3 1xhugqi xxx.156.0.xxx,192.xxx.1.12 /browse/TTPSTN-1054 [jira.web.component.ModuleWebComponentImpl] An exception occured while rendering the web panel: com.pyxis.greenhopper.jira:greenhopper-epics-issue-web-panel (null) java.lang.NullPointerException at com.atlassian.greenhopper.web.contextprovider.IssuesInEpicContextProvider.getContextMap(IssuesInEpicContextProvider.java:86) at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:144) at com.atlassian.jira.web.component.ModuleWebComponentImpl.renderModule(ModuleWebComponentImpl.java:87) at com.atlassian.jira.web.component.ModuleWebComponentImpl.renderModuleAndLetNoThrowablesEscape(ModuleWebComponentImpl.java:70) at com.atlassian.jira.web.component.ModuleWebComponentImpl.renderModule(ModuleWebComponentImpl.java:57) <+2> at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy415.renderModule(Unknown Source) <+2> at java.lang.reflect.Method.invoke(Unknown Source){code} The following error is thrown on the issue view page !epic.png|thumbnail! (!) If you're running OnDemand, please contact support. (!) If you're using an Oracle database, please check https://jira.atlassian.com/browse/GHS-10910 and see if the issue applies to your database. h3. Upgrade Notes for JIRA Agile 6.4.2: The upgrade involves upgrading the plugin and then checking the database for certain edge cases that can occur that are broken ranking values. If these edge cases have occurred they need to be fixed in the database, which is described below. # Back up JIRA DB and perform the workaround on a staging server first. # Upgrade JIRA Agile. # Stop JIRA. # Run the below SQL to clear up any improper ranking. This is PostgreSQL (see below for Oracle SQL). It's possible that no rows are deleted and this is not considered to be a problem. {code:SQL} DELETE FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE 'zzzzzz:' AND "ISSUE_ID" != 9223372036854775807 AND "TYPE" = 1; {code} # Run the below to identify if there are any problematic rows. If a number higher than 1 is returned they will need to be deleted, however it's possible no rows may be found. {code:SQL} WITH marker_row_buckets AS (SELECT "TYPE", substring("RANK" from 1 for 1) AS bucket FROM "AO_60DB71_LEXORANK" WHERE "TYPE" IN (0, 2)) SELECT * FROM "AO_60DB71_LEXORANK" WHERE "TYPE" = 1 AND substring("RANK" from 1 for 1) NOT IN (SELECT bucket FROM marker_row_buckets); {code} # Delete any rows from the previous SQL, for example: {code:SQL} DELETE FROM "AO_60DB71_LEXORANK" WHERE "ID" in (<n id from above>,<n+x from above>); {code} # Start JIRA. # Run a GET on {{<JIRA-BASE-URL>/rest/greenhopper/1.0/lexorank/balance}} *ONCE*. This will trigger a background job that will perform a balance (re-distribution of rank values, preserves the rank order of issues); (!) _Run the REST commands while logged in as a JIRA Administrator. The [REST Console|https://chrome.google.com/webstore/detail/rest-console/cokgbflfommojglbmbpenpphppikmonn?hl=en] can be used to generate the GET command._ # Monitor the balance background job by running the below query until all ranks are in only 1 bucket. {code:SQL} SELECT 'ROWS_IN_BUCKET_0', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '0|%' GROUP BY "FIELD_ID" UNION SELECT 'ROWS_IN_BUCKET_1', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '1|%' GROUP BY "FIELD_ID" UNION SELECT 'ROWS_IN_BUCKET_2', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '2|%' GROUP BY "FIELD_ID" ORDER BY "FIELD_ID"; {code} # Check to see if there are no more scheduled balance jobs by running the below query - it should return no rows. If it does return rows this means the balance is scheduled or running and can be monitored with the above SQL from step 10. {code:SQL} SELECT * FROM "AO_60DB71_LEXORANKBALANCER"; {code} # A balance can take quite some time depending on the amount of issues and rank fields. A rough performance function {code}amount of issues in system * amount of rank fields * duration of balance operation (100ms) {code} # Re-index (can be background). h5. Oracle SQL (!) _If using Oracle, ensure the database collation is set as per [Connecting JIRA to Oracle|https://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+Oracle]. It must be {{AL32UTF8}} - please consult with the Oracle DBA if this needs to be changed._ {code:SQL} SELECT COUNT(*) AS issue_row FROM AO_60DB71_LEXORANK WHERE TYPE = 1 AND SUBSTR(RANK, 1, 1) NOT IN ( SELECT SUBSTR(RANK, 1, 1) AS bucket FROM AO_60DB71_LEXORANK WHERE TYPE IN (0, 2)); {code} h3. Rollback the plugin It is possible to rollback to a previous version of the plugin as per the below steps. (!) {color:red}*The only version that can be rolled back to is 6.3.13.1. Any other version will cause significant problems*{color}. (!) # Unlock the rank fields as per [How to unlock a Locked field|https://confluence.atlassian.com/display/AGILEKB/How+to+unlock+a+Locked+field]. # From {{JIRA Administration > Issues > Custom Fields}} (left side menu), rename the rank fields to something else, for example Rank (LexoRank). # Rename the old (Obsolete) fields to their original name 'Rank'. # From JIRA Administration > Manage Add-ons, uninstall JIRA Agile. # Stop JIRA. # Roll-back the JIRA Agile version in the database with the following SQL: {code:SQL} UPDATE propertynumber SET propertyvalue = 42 WHERE id = (SELECT id FROM propertyentry WHERE property_key = 'GreenHopper.Upgrade.Latest.Upgraded.Version'); UPDATE propertystring SET propertyvalue = '42' WHERE id = (SELECT id FROM propertyentry WHERE property_key = 'com.pyxis.greenhopper.jira:build'); {code} # Start JIRA. # Install the previous version of JIRA Agile [6.3.13.1|http://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/jira/plugins/jira-greenhopper-plugin/6.3.13.1/jira-greenhopper-plugin-6.3.13.1.jar]. From JIRA Administration > Add-ons > Manage Add-ons (left side menu), choose 'Upload Add-on' and provide the URL or upload from your computer. # Reindex JIRA.

    Atlassian JIRA | 2 years ago | Abdoulaye Kindy Diallo [Atlassian]
    java.lang.NullPointerException
  2. 0

    {panel:title=Atlassian Status as of 11th July 2014|borderStyle=solid|borderColor=#3C78B5| titleBGColor=#3C78B5| bgColor=#E7F4FA} Dear Customers, The JIRA Agile Development and Support teams are currently working on resolving this issue at a high priority. This issue was initially found in JIRA Agile 6.4.0+, the specific cause for this issue found and was resolved in the JIRA Agile 6.4.2 release. It has been however found following to this release that subsequent similar issues have been seen where is it not possible to rank issues in JIRA Agile. It is understood that the cause of this issue after the 6.4.2 release is different to the initial bug, and that it may have something to do with specific database configuration or data being in an inconsistent state due to the previous bug. One of these issues is exposed within the Oracle Database server and has been logged in the following bug: GHS-10910 If customers have run into this problem and are not currently on 6.4.2 it is recommended that they immediately upgrade to the latest version of JIRA Agile as this should resolve their problems. If the upgrade does not fix the problem customers will need to trigger a *balance*, details on how to perform this are specified below. If the *balance* does not work and you are on an Oracle Database please follow the steps below entitled *Upgrade Notes for JIRA Agile 6.4.2*, it is possible you have run into GHS-10910 please follow that for updates. In other cases please contact https://support.atlassian.com, if customers urgently require their JIRA Agile to be functional again please follow the *Rollback the plugin* steps below. Cheers, Michael Andreacchio JIRA Support Team Lead {panel} Issues are not able to be ranked in JIRA Agile 6.4.x. Basically, when you try to rank the issues you are hitting into this error message: bq.JIRA Agile cannot execute the rank operation. This board has recently been configured to use the Rank field. The system must be re-indexed before you can rank issues. Ask your administrator to perform a manual re-index. The following error is thrown in the {{atlassian-jira.log}} {code} 2014-07-02 09:11:26,257 http-bio-8080-exec-97 WARN xxxxxx 551x7454x6 1hz4f54 xxx.xxx.10.xxx,192.xxx.1.12 /secure/QuickCreateIssue.jspa [greenhopper.customfield.lexorank.LexoRankIndexer] Could not retrieve LexoRank value for issue[id=123317]. Indexing max LexoRank value instead. 2014-07-02 09:11:26,797 http-bio-8080-exec-98 WARN xxxxxx 551x7444x3 1xhugqi xxx.xxx.0.xxx,xxx.xxx.1.xxx /browse/TTPSTN-1054 [greenhopper.customfield.lexorank.LexoRankCFType] Unable to retrieve rank for field [12070] and issue [122761] 2014-07-02 09:11:26,801 http-bio-8080-exec-98 WARN xxxxxx 551x7444x3 1xhugqi xxx.156.0.xxx,192.xxx.1.12 /browse/TTPSTN-1054 [greenhopper.customfield.lexorank.LexoRankCFType] gh.lexorank.service.error.retrytimeout 2014-07-02 09:11:26,802 http-bio-8080-exec-98 ERROR xxxxxx 551x7444x3 1xhugqi xxx.156.0.xxx,192.xxx.1.12 /browse/TTPSTN-1054 [jira.web.component.ModuleWebComponentImpl] An exception occured while rendering the web panel: com.pyxis.greenhopper.jira:greenhopper-epics-issue-web-panel (null) java.lang.NullPointerException at com.atlassian.greenhopper.web.contextprovider.IssuesInEpicContextProvider.getContextMap(IssuesInEpicContextProvider.java:86) at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:144) at com.atlassian.jira.web.component.ModuleWebComponentImpl.renderModule(ModuleWebComponentImpl.java:87) at com.atlassian.jira.web.component.ModuleWebComponentImpl.renderModuleAndLetNoThrowablesEscape(ModuleWebComponentImpl.java:70) at com.atlassian.jira.web.component.ModuleWebComponentImpl.renderModule(ModuleWebComponentImpl.java:57) <+2> at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy415.renderModule(Unknown Source) <+2> at java.lang.reflect.Method.invoke(Unknown Source){code} The following error is thrown on the issue view page !epic.png|thumbnail! (!) If you're running OnDemand, please contact support. (!) If you're using an Oracle database, please check https://jira.atlassian.com/browse/GHS-10910 and see if the issue applies to your database. h3. Upgrade Notes for JIRA Agile 6.4.2: The upgrade involves upgrading the plugin and then checking the database for certain edge cases that can occur that are broken ranking values. If these edge cases have occurred they need to be fixed in the database, which is described below. # Back up JIRA DB and perform the workaround on a staging server first. # Upgrade JIRA Agile. # Stop JIRA. # Run the below SQL to clear up any improper ranking. This is PostgreSQL (see below for Oracle SQL). It's possible that no rows are deleted and this is not considered to be a problem. {code:SQL} DELETE FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE 'zzzzzz:' AND "ISSUE_ID" != 9223372036854775807 AND "TYPE" = 1; {code} # Run the below to identify if there are any problematic rows. If a number higher than 1 is returned they will need to be deleted, however it's possible no rows may be found. {code:SQL} WITH marker_row_buckets AS (SELECT "TYPE", substring("RANK" from 1 for 1) AS bucket FROM "AO_60DB71_LEXORANK" WHERE "TYPE" IN (0, 2)) SELECT * FROM "AO_60DB71_LEXORANK" WHERE "TYPE" = 1 AND substring("RANK" from 1 for 1) NOT IN (SELECT bucket FROM marker_row_buckets); {code} # Delete any rows from the previous SQL, for example: {code:SQL} DELETE FROM "AO_60DB71_LEXORANK" WHERE "ID" in (<n id from above>,<n+x from above>); {code} # Start JIRA. # Run a GET on {{<JIRA-BASE-URL>/rest/greenhopper/1.0/lexorank/balance}} *ONCE*. This will trigger a background job that will perform a balance (re-distribution of rank values, preserves the rank order of issues); (!) _Run the REST commands while logged in as a JIRA Administrator. The [REST Console|https://chrome.google.com/webstore/detail/rest-console/cokgbflfommojglbmbpenpphppikmonn?hl=en] can be used to generate the GET command._ # Monitor the balance background job by running the below query until all ranks are in only 1 bucket. {code:SQL} SELECT 'ROWS_IN_BUCKET_0', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '0|%' GROUP BY "FIELD_ID" UNION SELECT 'ROWS_IN_BUCKET_1', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '1|%' GROUP BY "FIELD_ID" UNION SELECT 'ROWS_IN_BUCKET_2', "FIELD_ID", coalesce(COUNT(1), 0) AS rows_in_bucket FROM "AO_60DB71_LEXORANK" WHERE "RANK" LIKE '2|%' GROUP BY "FIELD_ID" ORDER BY "FIELD_ID"; {code} # Check to see if there are no more scheduled balance jobs by running the below query - it should return no rows. If it does return rows this means the balance is scheduled or running and can be monitored with the above SQL from step 10. {code:SQL} SELECT * FROM "AO_60DB71_LEXORANKBALANCER"; {code} # A balance can take quite some time depending on the amount of issues and rank fields. A rough performance function {code}amount of issues in system * amount of rank fields * duration of balance operation (100ms) {code} # Re-index (can be background). h5. Oracle SQL (!) _If using Oracle, ensure the database collation is set as per [Connecting JIRA to Oracle|https://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+Oracle]. It must be {{AL32UTF8}} - please consult with the Oracle DBA if this needs to be changed._ {code:SQL} SELECT COUNT(*) AS issue_row FROM AO_60DB71_LEXORANK WHERE TYPE = 1 AND SUBSTR(RANK, 1, 1) NOT IN ( SELECT SUBSTR(RANK, 1, 1) AS bucket FROM AO_60DB71_LEXORANK WHERE TYPE IN (0, 2)); {code} h3. Rollback the plugin It is possible to rollback to a previous version of the plugin as per the below steps. (!) {color:red}*The only version that can be rolled back to is 6.3.13.1. Any other version will cause significant problems*{color}. (!) # Unlock the rank fields as per [How to unlock a Locked field|https://confluence.atlassian.com/display/AGILEKB/How+to+unlock+a+Locked+field]. # From {{JIRA Administration > Issues > Custom Fields}} (left side menu), rename the rank fields to something else, for example Rank (LexoRank). # Rename the old (Obsolete) fields to their original name 'Rank'. # From JIRA Administration > Manage Add-ons, uninstall JIRA Agile. # Stop JIRA. # Roll-back the JIRA Agile version in the database with the following SQL: {code:SQL} UPDATE propertynumber SET propertyvalue = 42 WHERE id = (SELECT id FROM propertyentry WHERE property_key = 'GreenHopper.Upgrade.Latest.Upgraded.Version'); UPDATE propertystring SET propertyvalue = '42' WHERE id = (SELECT id FROM propertyentry WHERE property_key = 'com.pyxis.greenhopper.jira:build'); {code} # Start JIRA. # Install the previous version of JIRA Agile [6.3.13.1|http://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/jira/plugins/jira-greenhopper-plugin/6.3.13.1/jira-greenhopper-plugin-6.3.13.1.jar]. From JIRA Administration > Add-ons > Manage Add-ons (left side menu), choose 'Upload Add-on' and provide the URL or upload from your computer. # Reindex JIRA.

    Atlassian JIRA | 2 years ago | Abdoulaye Kindy Diallo
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.greenhopper.web.contextprovider.IssuesInEpicContextProvider.getContextMap()
    2. com.atlassian.greenhopper
      IssuesInEpicContextProvider.getContextMap
      1. com.atlassian.greenhopper.web.contextprovider.IssuesInEpicContextProvider.getContextMap(IssuesInEpicContextProvider.java:86)
      1 frame
    3. com.atlassian.plugin
      DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml
      1. com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:144)
      1 frame
    4. com.atlassian.jira
      ModuleWebComponentImpl.renderModuleAndLetNoThrowablesEscape
      1. com.atlassian.jira.web.component.ModuleWebComponentImpl.renderModule(ModuleWebComponentImpl.java:87)
      2. com.atlassian.jira.web.component.ModuleWebComponentImpl.renderModuleAndLetNoThrowablesEscape(ModuleWebComponentImpl.java:70)
      2 frames