【发布时间】:2019-09-14 03:50:25
【问题描述】:
我正在尝试使用该组件连接到 Corda,并使用 Apache Camel 的 Corda 组件再次将数据发送到 Apache ActiveMQ。
Corda 运行正常。特别是,cardapp-example 正在运行,并且 Notary-PartyA - PartyB 和 PartyC 都处于活动状态。我可以使用他们的终端查询。 ActiveMQ 工作正常,我用另一个输入源对其进行了测试。 我还尝试连接所有四个节点的不同本地主机端口,以及骆驼的corda组件网页中显示的示例。
public class CordaConnector {
public void ConnectToCorda() throws Exception {
CamelContext context = new DefaultCamelContext();
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
context.addComponent("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("corda://localhost:10004?username=user1&password=test&operation=VAULT_TRACK&contractStateClass=#contractStateClass").
}
});
while(true) {
context.start();
}
}
}
我收到以下错误消息:
Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[corda://localhost:10004?username=user1&pa... because of Failed to resolve endpoint: corda://localhost:10004?contractStateClass=%23contractStateClass&operation=VAULT_TRACK&password=test&username=user1 due to: Error binding property (contractStateClass=#contractStateClass) with name: contractStateClass on bean: org.apache.camel.component.corda.CordaConfiguration@1de76cc7 with value: #contractStateClass
...
所以单独测试时,corda 工作正常,ActiveMQ 工作正常(输出不同),我尝试了不同的端口来查询信息。我还尝试了不同的命令来查询,例如:
from("corda://localhost:10000?username=user1&password=test&operation=NETWORK_MAP_FEED").
to("activemq:queue:try");
我已经检查了这个问题Failed to create route route1,但没有任何帮助。 对于可能的原因,我将不胜感激。
【问题讨论】:
标签: apache-camel corda