1

我在我的 java 应用程序中使用了 RabbitMQ。我使用了 amqp-client3.1.3.jar。但是在 jboss 中部署我的代码时得到 java.lang.NoClassDefFoundError: com/rabbitmq/client/ConnectionFactory 。如何解决?

public class Exapmle {
    static Connection connection = null;
    static Channel channel = null;
    static ConnectionFactory factory = null;
    private Example() {
        try {
            factory = new ConnectionFactory();
            //--code goes here---//
        }

我在 ejb 中编写了相同的代码,该代码在 Wildfly 中调度和部署。我看到了将依赖项添加到 jboss 设置的解决方案。我该怎么做?

4

0 回答 0