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

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

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

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)

(info) Note the Invalid recipient: null root cause in the stacktrace.

原因

A follower of the user that is trying to Like  a content is no longer available due to  CONF-15614 - Getting issue details... STATUS .

ソリューション

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

  1. 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

    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

    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. Confluence を再起動します。
最終更新日 2018 年 11 月 2 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.