Configure Gravatar Server

We are running Bamboo and Confluence with the Confluence Avatar Server ( Bamboo can access a Gravatar server, but is nailed down to Is is possible to redirect Bamboo to use the Confluence Avatar Server?

2 answers

1 accepted

0 votes
Answer accepted

Hi Sebastien, redirecting Bamboo to use the Confluence Avatar Server isn't possible as we have hard coded in the code and we are unlikely to make this configurable anytime soon.

Vote for that issue!

The workaround is to implement GravatarService yourself. Change GRAVATAR_URL to your server:

private static String GRAVATAR_URL = "https://yourserver/confluence/rest/cas/1.0/avatar/server/";

Compile and install into:


problem with this approach is that you need to do it each time you upgrade.

Can you expand that a bit Justin?

I created a GravatarServiceImpl that implements the interface, using my own server, but after placing the compiled class in the directory yuo mention (which i had to create) it blows up!

I used the source downloaded from my.atlassian and changed the variable for server_URL only... not sure why it doesnt have the requred method.

2012-08-21 14:07:05,520 ERROR [http-8085-16] [FiveOhOh] 500 Exception was thrown.
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NoSuchMethodError: com.atlassian.bamboo.user.gravatar.GravatarServiceImpl.access$000(Lcom/atlassian/bamboo/user/gravatar/GravatarServiceImpl;)Lcom/atlassian/bamboo/configuration/AdministrationConfigurationManager;
Caused by: java.lang.NoSuchMethodError: com.atlassian.bamboo.user.gravatar.GravatarServiceImpl.access$000(Lcom/atlassian/bamboo/user/gravatar/GravatarServiceImpl;)Lcom/atlassian/bamboo/configuration/AdministrationConfigurationManager;
        ... 201 more

I pretty much did the same thing. You would do this in the unpacked war under your java container (?tomcat?). The classes in the classes direcectory are loaded before those in the lib directory which is why yours should get picked up first. I didn't have the code in front of me when I posted that but it would seem I also added:

public void setGravatarUrl(String gravatarUrl) { this.GRAVATAR_URL = gravatarUrl; }

Also I have done this in 3.1.1 and 3.4.4 YMMV

Hmm, maybe it is a change in the AdministrationConfigurationManager.

It uses a lazyreference that seems to be bombing out. I am trying a hard coded boolean for the enabled variable.

Yes! That was my trouble. The Atlassian provided class used a lazyreference for the boolean as to whether gravatar was enabled or not. ANd (for whatver reason) it blew up trying to access the adminstrationConfigurationManagement property for the actual value.

So I just hard coded a true (if I am deploying a custom class obvuiously I want the service enabled), and added soem explicit logging to alude to that.

So whenever you try to enable/disable the option you get:

2012-08-21 16:26:16,243 WARN [http-8085-3] [GravatarServiceImpl] A custom GravatarService class is in the WEB-INF/classes/com/atlassian/bamboo/user/gravatar directory, and will ignore the admin setting.

2012-08-21 16:26:16,243 WARN [http-8085-3] [GravatarServiceImpl] Gravatar URL : https://myserver/wiki/rest/cas/1.0/avatar/server/

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,498 views 4 13
Read article

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