Corda enterprise 3.2 无法加载自定义配置文件。

问题描述 投票:2回答:1

我们已经构建了一个与RabbitMQ连接的CordApp,需要一个配置文件来配置消息队列的订阅者和发布者。

CorDapp 是根据 3.2-corda 但在 Corda Enterprise 3.2 节点上运行时,却无法加载配置文件。

当我们启动 Corda Web 服务器时,日志中附加了以下异常。

作为 web 服务器启动:localhost:8080 [ERROR] 11:59:24+0000 [main] messaging.XXX.initializeQueues - 订阅 Rabbit 队列时捕获异常 [ERROR] 11:59:24+0000 [main] messaging.XXX.initializeQueues - net.corda.nodeapi.internal.config.ConfigUtilities. parseAs(LcomtypesafeconfigConfig;LkotlinreflectKClass;)LjavalangObject; java.lang.NoSuchMethodError: net.corda.nodeapi.internal.config.ConfigUtilities. parseAs(LcomtypesafeconfigConfig;LkotlinreflectKClass;)LjavalangObject; 2018年11月27日 11:59:25 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime。

加载配置的代码如下。

 val connectionConfig = defaultConfig!!
    .resolve()
    .getConfig("app-integration.rabbitMqConnectionConfiguration")
    .parseAs<RabbitMqConnectionConfiguration>()

鉴于我们使用的是一个通用的 parseAs<RabbitMqConnectionConfiguration>() 方法,我们假设这是为了随后调用一个 parseAs(Config, KClass): Object 方法,但由于某些原因,它似乎不见了?

corda
1个回答
0
投票

其实我会看看上面@joel的建议。Corda还不是一个 "开放核心 "项目。

所以,你有可能应该针对企业版的jar编译cordapps,以确定是应用的问题还是两个corda版本之间的API不同。

我的另一个怀疑是,可能在 corda OS 和 corda enterprise 中使用了不同版本的 java。

我也会看看这个问题是否在最新版本的corda中也持续存在。

© www.soinside.com 2019 - 2024. All rights reserved.