node-oracledb icon indicating copy to clipboard operation
node-oracledb copied to clipboard

Error parsing tnsnames.ora file in thin mode with Easy Connect String entries

Open sosoba opened this issue 1 year ago • 2 comments

  1. What versions are you using?

6.3.0

  1. Is it an error or a hang or a crash?

Error

  1. 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)
  1. 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.

sosoba avatar Feb 12 '24 08:02 sosoba

Thanks @sosoba . We will look at it

sharadraju avatar Feb 12 '24 15:02 sharadraju

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.

sreguna avatar Feb 13 '24 10:02 sreguna

This has been fixed in the 6.5 release.

sharadraju avatar May 03 '24 04:05 sharadraju