I'm using Corda Network Bootstrapper to setup a local Corda network using Docker, and trying to configure PostgreSQL as the database.
- The
partya_node.conf
file read by Network Bootstrapper:
devMode=true
myLegalName="O=PartyA,L=Paris,C=FR"
p2pAddress="partya:10200"
rpcSettings {
address="0.0.0.0:10201"
adminAddress="0.0.0.0:10202"
}
dataSourceProperties = {
dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
dataSource.url = "jdbc:postgresql://pg_partya:5432/db_partya"
dataSource.user = "pg_user"
dataSource.password = "pg_secret"
}
database = {
transactionIsolationLevel = READ_COMMITTED
}
jarDirs=["shared/drivers"]
security {
authService {
dataSource {
type=INMEMORY
users=[
{
password=test
permissions=[
ALL
]
user=user1
}
]
}
}
}
sshd {
port = 2222
}
shared/drivers
dir containspostgresql-42.2.14.jar
When I run the network bootstrapper tool:
java -jar corda-tools-network-bootstrapper-4.5.jar
I get the following error:
[ERROR] 15:51:24-0300 [main] internal.NodeStartupLogging. - Could not find the database driver class. Please add it to the drivers directory. [Error Code: database-missing-driver For further information, please go to https://docs.corda.net/docs/corda-os/4.5/error-codes.html] - Could not find the database driver class. Please add it to the 'drivers' folder. [errorCode=1oswgkz, moreInformationAt=https://errors.corda.net/OS/4.5/1oswgkz]
... still waiting. If this is taking longer than usual, check the node logs.
[EDIT]
The JDBC driver is mapped as a volume in docker-compose
:
volumes:
- ./partya_node.conf:/etc/corda/node.conf
- ./partya/certificates:/opt/corda/certificates
- ./partya/persistence:/opt/corda/persistence
- ./partya/logs:/opt/corda/logs
- ./shared/cordapps:/opt/corda/cordapps
- ./shared/node-infos:/opt/corda/additional-node-infos
- ./shared/network-parameters:/opt/corda/network-parameters
- ./shared/drivers/postgresql-42.2.14.jar:/opt/corda/drivers/postgresql-42.2.14.jar
Is it possible to configure Corda Network Bootstrapper to point to a driver's dir?