Discussion in 'Spigot Plugin Development' started by Aurelian6, Jun 2, 2015.

  1. Hello,

    I'm currently developping my plugins with RabbitMQ for sending messages to another dedicated server.
    But i use the "rabbitmq-client.jar" api but it's not a Spigot API.
    The problem is that RabbitMQ is not loaded by Spigot and can my plugin cannot find RabbitMQ classes (NoClassDefFoundError).
    How to make RabbitMQ works with Spigot?
  2. Either add the library to the Class-Path by using a manifest file, or shade it into your jar (in other words, include it)
  3. How to add the library to the Class-Path by using a manifest file ?
    • Create a manifest file (MANIFEST.MF, might need to be in the META-INF folder)
    • Add a Class-Path entry
      Code (Text):
      Class-Path: ../lib/rabbitmq-client.jar
    • Put the jar in <server folder>/lib/
  4. It's doesn't work...
  5. It does, your setup is likely incorrect. Check if your jar contains the MANIFEST.MF file.
  6. It's having the default manifest file but i have configured the manifest file : http://prntscr.com/7cacf0
  7. Open your jar in an archive tool and check if the MANIFEST.MF is in there ;)
  8. http://prntscr.com/7cc1ol
  9. @Aurelian6 that manifest does not seem to have the Class-Path entry, though.