java - Corda Node Database Unknown property 'schema'
问题描述
I get the following error when trying to perform ./build/nodes/runnodes for my cordapp. The party (Mint) which I want to connect to a standalone Postgresql database is giving this error:
[ERROR] 01:07:58-0400 [main] subcommands.ValidateConfigurationCli. - Error(s) while parsing node configuration:
- for path: "database.schema": Unknown property 'schema'.
In my node.conf file for a party (Mint) is
dataSourceProperties = {
dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
dataSource.url = "jdbc:postgresql://localhost:5432/sample_db"
dataSource.user = mint
dataSource.password = my_password
}
database = {
transactionIsolationLevel = READ_COMMITTED
schema = mint
}
# When JDBC driver is not placed into node's 'drivers' directory then add absolute path:
jarDirs = ['/Users/sayefiqbal/Documents/Corda/Metals-cordapp/build/nodes/Mint/drivers/postgresql-42.2.12.jar']
Note sure what is the issue. Followed documentation from Corda but no resolution so far.
解决方案
我想您正在使用 Corda 的社区版,它没有schema
可用的属性。但是,您可以在 JDBC URL 中指定模式,如下所示:
jdbc:postgresql://localhost:5432/sample_db?currentSchema=mint
有关详细信息,请参阅文档:https ://docs.corda.net/docs/corda-os/4.4/node-database.html#postgresql 。
推荐阅读
- salesforce - Apex 错误 - 尝试访问记录值时变量不存在
- python - pdb 无法使用 from currentdir import mod
- c# - 如何计算有多少客户在 SQL 中购买了产品
- css - 如何修复自定义字体的 CORS 错误?
- python - 从给定范围内的张量中删除值
- c# - 生成顺序很重要的列表的powerset
- javascript - 部署到 HTTPS 后无法访问 req.user
- ios - SDWebImage 使用 Swift 在 CellView 中将图像设置为 UIButton
- android - 如何解决 Android P 中的密码学更改?
- java - 为什么我的重写paintComponent方法没有被调用