CacheException when restarting JIRA Edited

Hello, I have a JIRA Instance with some custom addons (that add custom fields) , and I encountered a problem when I restart my Instance, JIRA  is correctly starting but i got many errors while going into different screens (errors 500) . Thoses errors are caused by the exception bellow.

Caused by: com.atlassian.cache.CacheException: java.lang.NullPointerException: null key in entry: null=null
at com.atlassian.cache.memory.DelegatingCachedReference.get(
at com.atlassian.jira.issue.managers.CachingCustomFieldManager.getCustomFieldObject(
at com.atlassian.jira.issue.managers.CachingCustomFieldManager.getCustomFieldObject(
at com.xpandit.raven.c.l.a(Unknown Source)
... 311 more
Caused by: java.lang.NullPointerException: null key in entry: null=null
at com.atlassian.jira.issue.managers.CachingCustomFieldManager$CustomFieldInMemoryStore.<init>(
at com.atlassian.jira.issue.managers.CachingCustomFieldManager.loadAllCustomFields(
at com.atlassian.cache.memory.MemoryCacheManager$1$1.load(
at com.atlassian.cache.memory.MemoryCacheManager$1$1.load(
at com.atlassian.cache.memory.DelegatingCachedReference.getUnderLock(
at com.atlassian.cache.memory.DelegatingCachedReference.get(
... 316 more


Did anyone have already encountered the same error ? and have found a solution to put back JIRA on it's feets.

1 answer

1 accepted

This widget could not be displayed.

Hi Jonathan,

The first thing I would do since this is a custom add-on is see if you're cfname is being set to NULL at any point.  If so there is a bug that you can find at Prevent the method updateCustomField() from accepting NULL values:

Problem Definition

The method updateCustomField(Long id, String name, String description, CustomFieldSearcher searcher)() mentioned in this documentation allows NULL values for the name parameter.

If this method is called by a script that passes a NULL value for the name parameter, a 500 error will be returned when accessing any page in JIRA except the admin section, as shown in the screenshot below:

For this reason, the method updateCustomField() should not allow null values.

Hopefully that's all that's going on at this point.  If that is the case please vote on JRASERVER-65856 to add impact and make the necessary changes to your code. 

If that is not the issue you're running into paste the code you're working with and we 'll go from there.



Hello @Branden McElveen

Thanks for your response; It helped me a lot.

You were right, there were cfname values at null in the database (in the customfield table) , after fixing this there were no more null pointer exception from custom fields cache at jira startup.

Theses null values were generated by my plugin, witch create custom fields when the plugin is enabled (with customFieldManager.createCustomField(...)). Now I working on fixing the creation of custom fields to avoid creating customfields with no cfname.

I don't use the method updateCustomField so i don't think my issue is related to JRASERVER-65856. However after fixing my plugin i will add feedback about the use of the createCustomField method.

Hi Jonathan,

I'm glad that helped even though it wasn't completely related.  Please don't hesitate to reach out to us if you run into any issues in the future!



For information , I put here a related issue in JIRA :

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

72 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you