コマース通知を送信しようとするとNullPointerExceptionが発生する

問題

  • CommerceNotificationHelper サービスを使用して通知を送信しようとすると、以下のようになります:
    _commerceNotificationHelper.sendNotifications(commerceOrder.getGroupId(),
    commerceOrder.getUserId(),
    RequestReceivedNotificationTypeImpl.KEY,
    commerceOrder);
  • 次の例外がスローされる:
    java.lang.NullPointerException: null
    at com.liferay.commerce.internal.order.term.contributor.ObjectRecipientCommerceDefinitionTermContributor.getFilledTerm(ObjectRecipientCommerceDefinitionTermContributor.java:99) ~[?:?]
    at com.liferay.commerce.notification.internal.util.CommerceNotificationHelperImpl._formatString(CommerceNotificationHelperImpl.java:173) ~[?:?]
    at com.liferay.commerce.notification.internal.util.CommerceNotificationHelperImpl._sendNotification(CommerceNotificationHelperImpl.java:225) ~[?:?]
    at com.liferay.commerce.notification.internal.util.CommerceNotificationHelperImpl.sendNotifications(CommerceNotificationHelperImpl.java:85) ~[?:?]
  • そして、コマース通知は作成されない。

Environment

  • Liferay DXP 7.4

解決策

追加情報

この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています