siqbal
siqbal

Reputation: 33

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.

Upvotes: 2

Views: 453

Answers (1)

Ashutosh Meher
Ashutosh Meher

Reputation: 1841

I suppose you are using the Community edition of Corda, It doesn't have the schema property available. However, you could specify the schema in the JDBC URL as below:

jdbc:postgresql://localhost:5432/sample_db?currentSchema=mint

Refer documentation for details: https://docs.corda.net/docs/corda-os/4.4/node-database.html#postgresql.

Upvotes: 1

Related Questions