【发布时间】:2019-04-15 14:29:13
【问题描述】:
我尝试在 Corda 3.0 和 Corda 4.0 中将 PostgreSQL 配置为节点的数据库。 我在 build.gradle 文件中添加了以下内容。 (Testdb1 是数据库名称。我也尝试过使用 postgres)
node{
...
// this part i have added
extraConfig = [
jarDirs: ['path'],
'dataSourceProperties': [
'dataSourceClassName': 'org.postgresql.ds.PGSimpleDataSource',
'"dataSource.url"' : 'jdbc:postgresql://127.0.0.1:5432/Testdb1',
'"dataSource.user"' : 'postgres',
'"dataSource.password"': 'admin@123'
],
'database': [
'transactionIsolationLevel': 'READ_COMMITTED'
]
]
// till here
}
reference.conf 文件中的这部分
dataSourceProperties = {
dataSourceClassName = org.postgresql.ds.PGSimpleDataSource
dataSource.url = "jdbc:postgresql://127.0.0.1:5432/Testdb1"
dataSource.user = postgres
dataSource.password = "admin@123"
}
database = {
transactionIsolationLevel = "READ_COMMITTED"
}
jarDirs = ["path"]
部署节点时出现以下错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:deployNodes'.
在 node-info-gen.log 文件中显示了 CAPSULE EXCEPTION。然后我将我的 JDK 更新为 8u191,但仍然出现同样的错误。
我已经完成了以下工作。可以从这里得到参考。 https://docs.corda.net/node-database.html , https://github.com/corda/corda/issues/4037 , How can the Corda node be extended to work with databases other than H2?
【问题讨论】:
标签: postgresql corda