JIRA error NullPointerException when Deleting a Custom Field can be resolved with this handy trick from the experts at Bobcares.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team recently helped a customer with a JIRA error when deleting a custom field.
Jira error NullPointerException when Deleting a Custom Field
The NullPointerException often pops up while creating or updating an issue in JIRA.
This error will prevent us from deleting a custom field. We can find the stacktrace as seen below in the JIRA log files:
java.lang.NullPointerException at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.removeAllValues(OfBizCustomFieldValuePersister.java:180) at com.atlassian.jira.issue.customfields.persistence.EagerLoadingOfBizCustomFieldPersister.removeAllValues(EagerLoadingOfBizCustomFieldPersister.java:62) at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.remove(AbstractSingleFieldType.java:106) at com.atlassian.jira.issue.fields.CustomFieldImpl.remove(CustomFieldImpl.java:649) at com.atlassian.jira.issue.managers.DefaultCustomFieldManager.removeCustomField(DefaultCustomFieldManager.java:374) at com.atlassian.jira.web.action.admin.customfields.DeleteCustomField.doExecute(DeleteCustomField.java:34) at webwork.action.ActionSupport.execute(ActionSupport.java:153) ... (more)
This error occurs due to a corrupt database. Usually due to custom field value being NULL.
Our Support Team has come up with an innovative solution to put an end to the NullPointerException error.
- First, we have to stop JIRA.
- Then, we will execute the following SQL query to verify if any custom file has NULL value:
select * from customfieldvalue where ISSUE is null; +-------+-------+-------------+-----------+------------------+-------------+-----------+-----------+-----------+ | ID | ISSUE | CUSTOMFIELD | PARENTKEY | STRINGVALUE | NUMBERVALUE | TEXTVALUE | DATEVALUE | VALUETYPE | +-------+-------+-------------+-----------+------------------+-------------+-----------+-----------+-----------+ | 36625 | NULL | 10000 | NULL | Field value | NULL | NULL | NULL | NULL | +-------+-------+-------------+-----------+------------------+-------------+-----------+-----------+-----------+ 1 row in set (0.00 sec)
- After that, we can remove the custom field value with the following command:
delete from custom field value where issue is null;
- Then, we have to restart JIRA for the changes to take effect.
[Hunting for a solution to another query? We are just a click away.]
Conclusion
To conclude, the skilled Support Engineers at Bobcares demonstrated what to do when we get the NullPointerException when deleting a custom field.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments