The comment from Scott Kurz is so brilliant, it should get it's own post:
If you'd like to verify if the Liberty server config is actually what you expect it to be:
See this blog: https://openliberty.io/blog/2019/09/13/testing-database-connections-REST-APIs.html
You need
<feature>restConnector-2.0</feature>
and an admin user (if you don't have one), e.g.
<quickStartSecurity userName="Bob" userPassword="bobpwd" />
Now you can see your DB-config: http://localhost:9080/ibm/api/config/dataSource/todoListDS.
For postgres it should look like this:
{
"configElementName": "dataSource",
"uid": "jpadatasource",
"id": "jpadatasource",
"jndiName": "jpadatasource",
"beginTranForResultSetScrollingAPIs": true,
"beginTranForVendorAPIs": true,
"connectionSharing": "MatchOriginalRequest",
"enableConnectionCasting": false,
"jdbcDriverRef": {
"configElementName": "jdbcDriver",
"uid": "dataSource[jpadatasource]/jdbcDriver[default-0]",
"libraryRef": {
"configElementName": "library",
"uid": "postgresql-driver",
"id": "postgresql-driver",
"apiTypeVisibility": "spec,ibm-api,api,stable",
"filesetRef": [
{
"configElementName": "fileset",
"uid": "library[postgresql-driver]/fileset[default-0]",
"caseSensitive": true,
"dir": "/Users/d067570/SAPDevelop/gh/ciaas/api/target/liberty/wlp/usr/shared/resources/",
"excludes": "",
"includes": "postgresql-*.jar",
"scanInterval": 0
}
]
}
},
"statementCacheSize": 10,
"syncQueryTimeoutWithTransactionTimeout": false,
"transactional": true,
"properties.postgresql": {
"databaseName": "postgres",
"password": "******",
"portNumber": 5432,
"preparedStatementCacheQueries": 0,
"serverName": "localhost",
"user": "postgres"
},
"api": [
"/ibm/api/validation/dataSource/jpadatasource"
]
}