Unable to Upload User Avatar

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When you try to upload an image for user avatar from Profile page, clicking on Confirm to save the image does nothing. The upload window just stands still. Closing it simply reverts to the original state.

The following appears in the atlassian-jira.log:

2014-03-19 16:40:08,057 http-bio-8080-exec-3 ERROR superadmin 1000x4640x1 181u6l1 192.168.0.223 /rest/api/latest/user/avatar [jira.rest.exception.ExceptionInterceptor] Returning internal server error in response
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)

...
Caused by: java.lang.NullPointerException
	at javax.imageio.ImageIO.write(Unknown Source)
	at com.atlassian.jira.avatar.AvatarManagerImpl.processImage(AvatarManagerImpl.java:211)
	at com.atlassian.jira.avatar.AvatarManagerImpl.create(AvatarManagerImpl.java:145)
	at com.atlassian.jira.avatar.AvatarPickerHelperImpl.convertTemporaryToReal(AvatarPickerHelperImpl.java:174)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  <+1>
	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.$Proxy252.convertTemporaryToReal(Unknown Source)  <+3>
	at java.lang.reflect.Method.invoke(Unknown Source)

Diagnosis

JIRA fails to write to the folder JIRA_Home/data/avatars.

Cause

You don't have the permission to write to the folder JIRA_Home/data/avatars.

Resolution

Modify the security settings of JIRA_Home/data/avatars folder and grant the permission to write/modify it to the user which is running the JIRA process.

Steps :

Linux :

    • chmod -R u=rwx,g=rwx,o=rx JIRA_Home/data/avatars

Windows : 

    1. Go to JIRA_Home/data directory, right-click "avatars" folder and view the Properties
    2. Go to the Security tab and check permission for who is running Jira. If the user doesn’t have write/modify permission click Edit… and allow it

Related Content


Last modified on Aug 10, 2022

Was this helpful?

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