Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Example of event listeners does not work (Crowd plugin)


I'm trying to run the example of a Crowd plugin with Event Listeners but it does not work.

I see differences between the official documentation and the repository example. For example, in the repository there is no listener section in atlassian-plugin.xml.

I have replaced the "System.out.println" line with a slf4j logger, but it also does not print any logs when a user is created.

If I add the listener section in atlassian-plugin.xml, when I launch Crowd it returns an error of ClassNotFoundException:

2022-06-16 09:48:53,336 localhost-startStop-1 ERROR [atlassian.plugin.manager.DefaultPluginManager] There was an error loading the descriptor 'User Created Listener' of plugin 'com.atlassian.crowd.example.crowd-event-listener-example'. Disabling.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.crowd.event.listener.example.UserCreatedListener': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.atlassian.crowd.event.listener.example.UserCreatedListener] from ClassLoader [com.atlassian.crowd.example.crowd-event-listener-example [28]]
at com.atlassian.crowd.console.listener.StartupListener.contextInitialized(
at org.apache.catalina.core.StandardContext.listenerStart(
Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.atlassian.crowd.event.listener.example.UserCreatedListener] from ClassLoader [com.atlassian.crowd.example.crowd-event-listener-example [28]]
Caused by: java.lang.ClassNotFoundException: com.atlassian.crowd.event.user.UserCreatedEvent not found by com.atlassian.crowd.example.crowd-event-listener-example [28]

This is the source code (without the listener section):

package com.atlassian.crowd.event.listener.example;

import com.atlassian.crowd.event.user.UserCreatedEvent;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class UserCreatedListener{
private static final Logger log = LoggerFactory.getLogger(UserCreatedListener.class);

public void printUserCreatedEvent(UserCreatedEvent event) {
log.debug("User " + event.getUser().getDisplayName() + " has been created.");


<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${}" plugins-version="2">
<vendor name="${}" url="${project.organization.url}" />


<?xml version="1.0" encoding="UTF-8"?>

<project xmlns=""


<name>Example Company</name>

<description>This is an event listener plugin for Atlassian Crowd.</description>








1 answer

Hey @CARLOS MEDINA SANCHEZ and welcome to the community!

I tried to download and run this example and have same problem as you have: ClassNotFoundException, when I was running my Crowd.

I can describe my way to solve this issue:
1) I created my custom crowd plugin with command:


2) Then I updated my atlas-create-crowd-plugin-module. That will allow you to use Crowd 4.4. 


3) I added UserCreatedListener class and dependencies to newly created project.
Also you can use different log levels. Other way to enable DEBUG level use this how to. Just for fun I enabled them all:

System.out.println("User " + event.getUser().getDisplayName() + " has been created.");"User " + event.getUser().getDisplayName() + " has been created.");
log.warn("User " + event.getUser().getDisplayName() + " has been created.");
log.debug("User " + event.getUser().getDisplayName() + " has been created.");
log.error("User " + event.getUser().getDisplayName() + " has been created.");

4) Then I used this command to run Crowd 4.4 with my plugin.

mvn crowd:run

And after I created user I had this message in logs:
Screenshot 2022-06-23 at 12.11.26.png


I hope this small guide will help you to resolve the issue.

You can find atlas-create-crowd-plugin-module file in your atlassian-plugin-sdk folder. For me it was:



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

197 views 0 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you