node-oracledb
node-oracledb copied to clipboard
Error parsing tnsnames.ora file in thin mode with Easy Connect String entries
- What versions are you using?
6.3.0
- Is it an error or a hang or a crash?
Error
- What error(s) or behavior you are seeing?
TypeError: Cannot read properties of null (reading 'name')
at createNode (oracledb\lib\thin\sqlnet\connStrategy.js:167:22)
at resolveAddress (oracledb\lib\thin\sqlnet\networkSession.js:96:10)
- Include a runnable Node.js script that shows the problem.
tnsnames.ora:
XE = tcp://localhost/XE
test.js
import oracledb from 'oracledb';
await oracledb.getConnection({connectionString: 'XE', user: 'nobody', password: 'empty'});
The connection is established correctly via oracledb thick mode same as sqlplus, SqlDeveloper, ojdbc.
Thanks @sosoba . We will look at it
Though this works in thick mode, Easy Connect entries in tnsnames.ora is not a documented feature. We will look into adding this support for thin mode.
This has been fixed in the 6.5 release.