Error thrown when accessing or creating JIRA Agile board due to Dead References on Cascading Select custom field
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
Problem
1) Javascript Error thrown when accessing JIRA Agile board due to Dead References on Cascading Select custom field. The following was thrown when the user loads any of the JIRA Agile boards
1
2
3
4
An error occurred whilst rendering this message. Please contact the administrators, and inform them about this bug.
Details:----- org.apache.velocity.exception.MethodInvocationException: Invocation of method 'shouldShowSidebar' in class com.atlassian.greenhopper.web.rapid.RapidBoardAction threw exception
com.atlassian.cache.CacheException: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
at com.pyxis.greenhopper-webactions/templates/greenhopper/web/board/rapid/rapid-board.vm[line19, column 22].....
The following appears in the atlassian-jira.log
1
2
3
4
5
6
7
8
9
10
11
12
13
/secure/RapidBoard.jspa [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: com.atlassian.cache.CacheException: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
com.atlassian.cache.CacheException: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:306)
at com.atlassian.cache.compat.delegate.DelegatingCache.get(DelegatingCache.java:37)
at com.atlassian.greenhopper.service.query.QueryToProjectMapper.getProjectContextIdsForQuery(QueryToProjectMapper.java:76)
at com.atlassian.greenhopper.service.query.QueryServiceImpl.getProjectsForRapidView(QueryServiceImpl.java:114)
at com.atlassian.greenhopper.service.query.QueryServiceImpl.getExplicitProjectsForRapidViewFilterQuery(QueryServiceImpl.java:101)
at com.atlassian.greenhopper.service.rapid.ProjectRapidViewServiceImpl.findRapidViewsByProject(ProjectRapidViewServiceImpl.java:53)
at com.atlassian.greenhopper.web.sidebar.BoardSidebarRenderer.projectIsPartOfRapidViewFilter(BoardSidebarRenderer.java:110)
at com.atlassian.greenhopper.web.sidebar.BoardSidebarRenderer.shouldShowProjectSidebar(BoardSidebarRenderer.java:103)
at com.atlassian.greenhopper.web.sidebar.BoardSidebarRenderer.shouldShowSidebar(BoardSidebarRenderer.java:96)
at com.atlassian.greenhopper.web.sidebar.BoardSidebarRenderer.shouldShowSidebar(BoardSidebarRenderer.java:83)
at com.atlassian.greenhopper.web.rapid.RapidBoardAction.shouldShowSidebar(RapidBoardAction.java:241) <+3> (NativeMethodAccessorImpl.java:62) (DelegatingMethodAccessorImpl.java:43)
2) JIRA throws an error when creating a new board. The following happens in the atlassian-jira.log
1
2
3
4
5
6
7
8
9
10
11
12
13
There was a SQL exception thrown by the Active Objects library:
Database:
- name:Oracle
- version:Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
- minor version:1
- major version:11
Driver:
- name:Oracle JDBC driver
- version:11.2.0.2.0
java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (XXXXXX.SYS_XXXXXXX) violated
See related: JRASERVER-64276 - NullPointerException in getFieldConfig
Diagnosis
Check the custom field in the JQL of the affected board filter that causes this problem
Identify the custom field that causes the problem, get the customfield ID
Run the following SQL query to see if there is any custom fields that is not associated with any field configuration
1 2 3 4
SELECT distinct(customfieldconfig) FROM customfieldoption WHERE customfieldconfig NOT IN (SELECT id FROM fieldconfiguration); 10480 10470 10240
If any rows returned, proceed to resolution.
Sometimes you have to fine tune the SQL query to get a complete list. In that case, you can run the SQL query from step 3 and the SQL query below to verify the complete list of the problematic custom field:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
SELECT distinct(cf.cfname) AS "Custom Field Name", cfo.customfieldconfig AS "Field Config" FROM customfieldoption cfo LEFT JOIN customfield cf ON cfo.customfield = cf.id WHERE customfieldconfig IN ( SELECT distinct(customfieldconfig) FROM customfieldoption WHERE customfieldconfig NOT IN (SELECT id FROM fieldconfiguration));
Check that data with ID:10480,10470,10240 from customfieldoption are not used in Issues:
1
select count(*) from customfieldvalue where stringvalue in (select cast(id as text) from customfieldoption where customfield = 10040 and customfieldconfig in (10240,10470,10480));
Cause
The custom field has dead references in the 'customfieldoption' table.
Solution
Resolution
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Stop JIRA.
Delete the entries in 'customfieldtoption' table that aren't related to this custom field context.
1
delete from customfieldoption where customfield=ID_from_diagnosis_step_2 and customfieldconfig=ID_from_diagnosis_step_3;
Start JIRA and verify the problem is no longer present.
Was this helpful?