Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MongoServerError: Database unavailable: Cannot invoke "oracle.dbtools.common.pools.DataSourceTarget.modify()" because "this.p

BjarteBrandtAug 23 2023 — edited Aug 23 2023

Hi,

I have configured Oracle 23c DE, APEX and ORDS. Now I would like to try out the MongoDB API. So following this blog-post brings me this message: "MongoServerError: Database unavailable: Cannot invoke "oracle.dbtools.common.pools.DataSourceTarget.modify()" because "this.pool" is null"

mongosh --tlsAllowInvalidCertificates 'mongodb://bjarte:Password1@localhost:27017/bjarte?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true'
Current Mongosh Log ID: 64e6247c070ba619762d201f
Connecting to: mongodb://<credentials>@localhost:27017/bjarte?authMechanism=PLAIN&authSource=%24external&ssl=true&retryWrites=false&loadBalanced=true&serverSelectionTimeoutMS=2000&tlsAllowInvalidCertificates=true&appName=mongosh+1.10.5
MongoServerError: Database unavailable: Cannot invoke "oracle.dbtools.common.pools.DataSourceTarget.modify()" because "this.pool" is null

ORDS is configured like this:

ords install \
--db-pool db1 \
--admin-user SYS \
--db-hostname localhost \
--db-port 1521 \
--db-servicename FREEPDB1 \
--feature-sdw true \
--feature-db-api true \
--feature-rest-enabled-sql true \
--gateway-mode proxied \
--gateway-user APEX_PUBLIC_USER \
--proxy-user \
--password-stdin <<EOF
ConvergedDB_1234
Passw0rd!1
EOF
ords config set "mongo.enabled" "true" >> ${ORACLE_CFG_SCRIPTS}/oracle23de.log 2>&1
ords config set "standalone.context.path" "/ords" >> ${ORACLE_CFG_SCRIPTS}/oracle23de.log 2>&1
ords config set "standalone.doc.root" "/etc/ords/config/global/doc_root" >> ${ORACLE_CFG_SCRIPTS}/oracle23de.log 2>&1
ords config set "standalone.http.port" "8080" >> ${ORACLE_CFG_SCRIPTS}/oracle23de.log 2>&1
ords config set "standalone.static.context.path" "/i/" >> ${ORACLE_CFG_SCRIPTS}/oracle23de.log 2>&1
ords config set "standalone.static.path" "/opt/oracle/product/23c/dbhomeFree/apex/images" >> ${ORACLE_CFG_SCRIPTS}/oracle23de.log 2>&1

I have created user “bjarte” in the FREEPDB1. Why isn't the database available…?

Thank you,

Bjarte

This post has been answered by BjarteBrandt on Aug 25 2023
Jump to Answer
Comments
Post Details
Added on Aug 23 2023
5 comments
769 views