【发布时间】:2018-09-23 19:55:01
【问题描述】:
我想在 Corda 3.1 企业版中使用 Oracle 11g 数据库设置 Corda 节点:
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'net.corda.plugins.quasar-utils'
apply plugin: 'maven-publish'
jar.baseName = "cordapp-example"
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes"
node {
name "O=Notary Pool,L=Sao Paolo,C=BR"
notary = [validating : false]
p2pPort 10002
rpcSettings {
address("localhost:10003")
adminAddress("localhost:10043")
}
webPort 10004
cordapps = ["$corda_release_group:corda-finance:$corda_release_version"]
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
}
node {
name "O=First Bank of London,L=London,C=GB"
p2pPort 10005
rpcSettings {
address("localhost:10006")
adminAddress("localhost:10046")
}
webPort 10007
cordapps = ["$corda_release_group:corda-finance:$corda_release_version"]
rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
dataSourceProperties {
dataSourceClassName = "oracle.jdbc.pool.OracleDataSource"
dataSource.url = "jdbc:oracle:thin:@localhost:1521:db11g2"
dataSource.user = "sys"
dataSource.password = "98765"
}
database = {
transactionIsolationLevel = READ_COMMITTED
schema = "db11g2"
}
}
}
我部署这个任务时出现错误:
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\WorkPlaceCorda\TestDatabase\cordapp-example\kotlin-source\build.gradle' line: 94
* What went wrong:
A problem occurred evaluating project ':kotlin-source'.
Could not find method dataSourceProperties() for arguments [build_4c7s0yjnncjhr0s832fhma3b4$_run_closure6$_closure16$_closure21@45dad5d1] on object of type net.corda.plugins.Node.
那么,如何配置参数“dataSourceProperties”来连接这个节点到Oracle数据库?
【问题讨论】:
标签: corda