pinpoint-apm/pinpoint · warning
Failed to notify user group deletion listener. listener={},
Error message
Failed to notify user group deletion listener. listener={}, userGroupId={} What it means
UserGroupServiceImpl notifies registered UserGroupDeletionListener beans after a user group is deleted. Each listener is invoked inside a try/catch for RuntimeException; if a listener throws, the failure is logged as a warning ('Failed to notify user group deletion listener') with the listener class and group id, and iteration continues with the remaining listeners. The deletion itself is not rolled back — the error only indicates a side-effect listener failed.
Source
Thrown at user/src/main/java/com/navercorp/pinpoint/user/service/UserGroupServiceImpl.java:243
}
private boolean containMemberForUserGroup(String userId, String userGroupId) {
List<UserGroupMember> memberList = userGroupDao.selectMember(userGroupId);
for (UserGroupMember member : memberList) {
if(member.getMemberId().equals(userId)) {
return true;
}
}
return false;
}
private void notifyUserGroupDeleted(UserGroup userGroup) {
for (UserGroupDeletionListener listener : userGroupDeletionListeners) {
try {
listener.onUserGroupDeleted(userGroup);
} catch (RuntimeException e) {
logger.warn("Failed to notify user group deletion listener. listener={}, userGroupId={}",
listener.getClass().getName(), userGroup.getId(), e);
}
}
}
private void notifyUserGroupDeletedAfterCommit(UserGroup userGroup) {
if (userGroupDeletionListeners.isEmpty()) {
return;
}
if (!TransactionSynchronizationManager.isSynchronizationActive()) {
notifyUserGroupDeleted(userGroup);
return;
}
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
notifyUserGroupDeleted(userGroup);View on GitHub (pinned to 744c3d3075)
Solutions
- Inspect the logged stack trace (the 'e' argument) to see which listener class threw and why
- Fix or make resilient the listener identified by listener=<class> in the log (catch its own failures, add retries)
- Verify the listener's own transaction/DB state — it runs after the group deletion commit, so referenced data may already be gone
- If the side effect matters, add compensating logic or re-run the listener for the affected userGroupId
Example fix
// before (listener throws when group already deleted)
public void onUserGroupDeleted(UserGroup userGroup) {
UserGroup group = userGroupService.selectUserGroup(userGroup.getId()); // NPE-prone if already gone
cacheService.evict(group.getName());
}
// after
public void onUserGroupDeleted(UserGroup userGroup) {
cacheService.evict(userGroup.getName()); // use the payload, don't re-query
} Defensive patterns
Strategy: try-catch
Try / catch
// listener authors should self-guard; service callers only see the warn log
@Override
public void onUserGroupDeleted(UserGroup userGroup) {
try {
doCleanup(userGroup.getId());
} catch (RuntimeException e) {
logger.warn("cleanup failed for userGroupId={}", userGroup.getId(), e);
// never propagate: the service already isolates and continues with other listeners
}
} Prevention
- Make every UserGroupDeletionListener idempotent and defensive: it runs after the delete commit, so the group row is already gone
- Never re-query the deleted group inside the listener; use the payload passed to onUserGroupDeleted
- Add retry or outbox handling for listeners with critical side effects (cache eviction, notifications)
- Keep listener implementations side-effect-failure tolerant so one bad bean doesn't disrupt user group deletion
When it happens
Trigger: A registered UserGroupDeletionListener's onUserGroupDeleted(userGroup) throws a RuntimeException, e.g. it performs its own DB writes or remote calls that fail while processing deletion of the given user group id.
Common situations: A listener that cleans up related data hits a constraint violation or connectivity problem; Spring event/listener bean misconfigured and throwing NPE on the deleted group's id; downstream service (e.g. notification or authorization cache) unavailable at deletion time.
Related errors
- Failed to detect pinpoint profile. Please add -Dpinpoint.act
- unsupported profile or profile alias:
- UNSUPPORTED_OPERATION
- startTime not recorded
- slot type:${slot}
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/1e07e64318d9a441.
Report an issue: GitHub.