0

I am trying to build a custom event listener for Keycloak, which should use RabbitMQ (a third party library for an event bus implementation) to publish an event whenever a user registers.

I already managed to implement the example from the Keycloak documentation. But as soon as I reference the RabbitMQ Client Library in my pom.xml, I receive an error in the console as soon as I select my custom event listener in the Keycloak admin console. The error message says: "Uncaught server error: java.lang.NoClassDefFoundError: com/rabbitmq/client/ConnectionFactory".

I also tried to add the .jar file with the RabbitMQ client library to my src-folder as described here, but that doesn't change anything.

I'm relatively new to Java deployment, so probably I am missing something obvious here. I hope that there is anybody who can help me.

-timnot90

timnot90
  • 351
  • 1
  • 13

1 Answers1

0

Found a solution: I am using the maven-shade-plugin now, as described in http://lists.jboss.org/pipermail/keycloak-user/2016-April/005902.html (the answer of Anthony), which puts the .class files of my third party library right into the .jar-file.

timnot90
  • 351
  • 1
  • 13