NullPointerException when viewing User Profile

Still need help?

The Atlassian Community is here for you.

Ask the community


  1. When viewing a user profile, a NullPointerException is generated.
  2. When attempting to view an avatar, the same exception is generated.

The following appears in the atlassian-jira.log:

2012-09-19 16:18:12,258 http-8080-5 ERROR captain.planet 978x1081x1 1unn6n4 /secure/ViewProfile.jspa [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
	at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.getKeys(
	at com.opensymphony.module.propertyset.AbstractPropertySet.getKeys(
	at com.atlassian.jira.propertyset.JiraCachingPropertySet.getKeys(
	at com.atlassian.jira.user.profile.DetailsUserProfileFragment.getUserProperties(
	at com.atlassian.jira.user.profile.DetailsUserProfileFragment.createVelocityParams(
	at com.atlassian.jira.user.profile.AbstractUserProfileFragment.getFragmentHtml(
	at sun.reflect.GeneratedMethodAccessor856.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(
	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(
	at com.atlassian.velocity.htmlsafe.introspection.AnnotationBoxingMethod.invoke(
	at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(
	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(
	at org.apache.velocity.runtime.parser.node.ASTReference.execute(
	at org.apache.velocity.runtime.parser.node.ASTReference.render(
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(
	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(
	at org.apache.velocity.runtime.parser.node.SimpleNode.render(
	at org.apache.velocity.Template.merge(
	at org.apache.velocity.Template.merge(


An error has caused an update of the user properties to be half-complete, leaving a null in the place of where an object should be.


Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

  1. Using the Database Integrity Checker, verify if this fixes the problem. If not, continue with the following steps.
  2. Stop JIRA.
  3. Identify the NULL values within the propertyentry table with the following SQL:

    SELECT * FROM propertyentry p JOIN external_entities e ON p.entity_id = WHERE IS NULL OR entity_name IS NULL OR entity_id IS NULL OR property_key IS NULL OR propertytype IS NULL;

    In this example, the below was returned:

    22359	ExternalEntity	10	jira.user.suppressedTips.focusShifter	NULL	10	captain.planet	com.atlassian.jira.user.OfbizExternalEntityStore
    tip/resting Created with Sketch.

    In order to correct this fix, manipulation of the database will be required. If incorrect updates are made, it can cause data integrity issues, so do so at your own risk. If you're uncertain what to do, please contact Atlassian Support at

  4. After identifying the record within the database, it will need to be updated with an appropriate value. To identify what the value could be, it is necessary to compare it to other records that are working. In this example, this propertyentry.property_key has the NULL. To identify other values in the database, the following SQL can be used. If need be, replace jira.user.suppressedTips.focusShifter with the value that has the NULL.

     SELECT * FROM propertyentry p JOIN external_entities e ON p.entity_id = WHERE property_key = 'jira.user.suppressedTips.focusShifter';

    Which in this example has returned the below results:

    22359	ExternalEntity	10	jira.user.suppressedTips.focusShifter	NULL	10	captain.planet	com.atlassian.jira.user.OfbizExternalEntityStore
    22559	ExternalEntity	910	jira.user.suppressedTips.focusShifter	NULL	910	wonder.woman	com.atlassian.jira.user.OfbizExternalEntityStore
  5. As can be seen from these results, propertyentry.propertytype of 1 for user wonder.woman is a valid value (provided that user is not experiencing any errors!) and the database can be updated to reflect the value, as below:

     UPDATE propertyentry SET propertytype = 1 where id = {ID from the problematic record};
  6. Start JIRA.
  7. Test if the user works by replicating the behaviour. If the problem is still present, please restore your backup immediately and raise a Support Request on


It's also possible to remove the avatar entries directly from the database using the following SQL, however this may not necessarily be the cause. Replace captain.planet with the user name that requires correcting.

DELETE 	pn, pe, a

FROM 	external_entities e

JOIN 	propertyentry pe
ON 		= 		pe.entity_id
JOIN 	propertynumber pn
ON 		=
JOIN 	avatar a
ON 		= 		pn.propertyvalue

WHERE	name		=		'captain.planet';
tip/resting Created with Sketch.

The above is MySQL syntax and may need changing for Oracle or MS SQL. If multiple users require updating, the operator used in the WHERE clause could be replaced with an IN.

Last modified on Nov 12, 2018

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.