我正在调查WSO2 esb和RabbitMq的组合,虽然我越来越近了(:-)),但仍然出现了问题。我读过这个article。 安装了该功能,配置了接收器和发送器。我看到在RabbitMq中自动创建了queue1和exchange1。但每当我想通过向RabbitMq管理站点中的queue1发送消息来测试配置时,我会收到以下错误:
---
[2013-06-07 16:37:00,230] INFO – ProxyService Successfully created the Axis2 service for Proxy service : AMQPProxy
[2013-06-07 16:37:33,600] ERROR – NativeWorkerPool Uncaught exception java.lang.NullPointerException
at org.apache.axis2.transport.rabbitmq.ServiceTaskManager$MessageListenerTask.getConsumerDelivery(ServiceTaskManager.java:290)
at org.apache.axis2.transport.rabbitmq.ServiceTaskManager$MessageListenerTask.run(ServiceTaskManager.java:179)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
----
有人知道这里发生了什么吗?
答案 0 :(得分:3)
这是因为您在发送邮件时未设置内容类型和内容编码。请确保在构建器中设置contentType和contentEncoding。
builder.contentType("text/xml");
builder.contentEncoding("utf-8");