'Like' Feature is Not Working Due to "Like Failed" Error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Like feature in Confluence is not working due to Like Failed error. The following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2012-10-14 23:23:07,824 ERROR [http-8080-7] [atlassian.event.internal.EventPublisherImpl] invokeListeners There was an exception thrown trying to dispatch event 'com.atlassian.confluence.event.events.like.LikeCreatedEvent@16e78c0b[user=EmbeddedCrowdUser{name='admin', displayName='AdminInternal', directoryId=00000001},content=page: This is a Test Page v.1 (30895848),timestamp=1350235387622]' from the invoker 'com.atlassian.event.internal.SingleParameterMethodListenerInvoker@2aa78480'. -- url: /rest/likes/1.0/content/40697858/likes | userName: admin | referer: http://<Server Base URL>/pages/viewpage.action?pageId=30895848 java.lang.RuntimeException: Invalid recipient: null at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:28) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:56) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:151) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:70) at com.atlassian.confluence.like.DefaultLikeManager.addLike(DefaultLikeManager.java:50) ..... Caused by: java.lang.IllegalArgumentException: Invalid recipient: null at com.atlassian.confluence.plugins.like.notifications.LikeNotification.<init>(LikeNotification.java:29) at com.atlassian.confluence.plugins.like.notifications.DefaultLikeNotificationManager.getNotifications(DefaultLikeNotificationManager.java:70) at com.atlassian.confluence.plugins.like.notifications.NotificationListener.innerOnLikeEvent(NotificationListener.java:155) at com.atlassian.confluence.plugins.like.notifications.NotificationListener.access$100(NotificationListener.java:58) at com.atlassian.confluence.plugins.like.notifications.NotificationListener$1.doInTransaction(NotificationListener.java:104)

ℹ️ Note the Invalid recipient: null root cause in the stacktrace.

Resolution

The following steps will delete all follower and followee entries that are no longer exist in cwd_user table

  1. Shutdown Confluence

  2. Create a backup of Confluence database for safety precaution

  3. Only if you are on Confluence 5.1.x or earlier:

    Execute the following SQL queries

    1 2 3 4 5 DELETE FROM FOLLOW_CONNECTIONS WHERE LOWER(FOLLOWER) NOT IN (SELECT lower_user_name FROM cwd_user);   DELETE FROM FOLLOW_CONNECTIONS WHERE LOWER(FOLLOWEE) NOT IN (SELECT lower_user_name FROM cwd_user);

    Only if you are on Confluence 5.2.x or later:

    Execute the following SQL queries

    1 2 3 4 5 6 7 DELETE FROM FOLLOW_CONNECTIONS WHERE FOLLOWER NOT IN (SELECT user_key FROM user_mapping WHERE LOWER(username) IN (SELECT lower_user_name FROM cwd_user));   DELETE FROM FOLLOW_CONNECTIONS WHERE FOLLOWEE NOT IN (SELECT user_key FROM user_mapping WHERE LOWER(username) IN (SELECT lower_user_name FROM cwd_user));
  4. Restart Confluence

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.