首页 > 解决方案 > 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.

标签: javapostgresqlcorda

解决方案


我想您正在使用 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 。


推荐阅读