Description
I am running Oracle XE 21c in a Docker container and I can connect to it with a JDBC thin connection using the JDBC url jdbc:oracle:thin:@localhost:1521:XE using the SYSTEM account. I can also connect with sqlplus either by logging into the terminal Docker instance or by using sqlplus on the host OSX machine.
When I try to connect to it using NodeJS OracleDB example code described here:
https://node-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html, I cannot get the client to connect using either:
connection = await oracledb.getConnection({
user : "hr",
password : mypw
connectString : "localhost/XEPDB1"
});
or
connection = await oracledb.getConnection({
user : "SYSTEM",
password : "MyPassword",
connectString : "localhost/XE"
});
I get an error ORA-01017: invalid username/password; logon denied.
sqlplus works fine if I use this connection string sqlplus SYSTEM/Password@localhost:1521/XE
if I change the code to:
const connection = await oracledb.getConnection({
//user: connectionURI.user,
//password: connectionURI.password,
connectString: "SYSTEM/Password@localhost:1521/XE"
});
I get the error ORA-12154: TNS:could not resolve the connect identifier specified
It seems odd that I can connect with sqlplus but not with node-oracledb. Any ideas?