Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from 5.5.0 to latest 6 version #1675

Closed
karkan20 opened this issue May 24, 2024 · 12 comments
Closed

Upgrading from 5.5.0 to latest 6 version #1675

karkan20 opened this issue May 24, 2024 · 12 comments
Labels

Comments

@karkan20
Copy link

karkan20 commented May 24, 2024

Title: Error NJS-516 when Upgrading from 5.5.0 to 6.0 or 6.5.1 in Thin Mode

Using Node.js 20 framework.

Describe the problem:

I am trying to upgrade the version of my project from 5.5.0 to 6.0.0 or 6.5.1 major versions. However, I encounter an error when creating a pool:

NJS-516: no configuration directory set or available to search for tnsnames.ora

I'm not sure what is missing. As per my understanding, configdir is an optional parameter for thin mode.

I have tried the examples provided in the repository, but they are more or less the same for thin mode and do not resolve the issue.

Steps to reproduce:

  1. Upgrade the project version from 5.5.0 to 6.0.0 or 6.5.1.
  2. Attempt to create a pool in thin mode

Actual behavior:

The error NJS-516: no configuration directory set or available to search for tnsnames.ora

Can anyone help to understand what could be missing from dbconfig?

@anthony-tuininga
Copy link
Member

What is in your database configuration? The connect string is important in particular. Note that if you are upgrading from 5.5.0 you can also add a call to oracledb.initOracleClient() which will enable thick mode -- which should work in the same way as 5.5.0 did.

@karkan20
Copy link
Author

karkan20 commented May 24, 2024

connectstring = "service_name"
Where service_name databasename.

@sharadraju
Copy link
Member

sharadraju commented May 24, 2024

@karkan20 If you are using LDAP, LDAP is not supported in node-oracledb's default Thin mode. You will have to use the Thick mode.

However, the documentation is missing, which we will update. Thanks for bringing this to our attention!

@karkan20
Copy link
Author

It is working for thin mode in 5.5.0 version.
So if I want to upgrade to 6.0.0 I need to use thick mode?

@sharadraju
Copy link
Member

sharadraju commented May 24, 2024

Node-oracledb 5.5 does not have a 'Thin' mode. It relied on Oracle Instant Client libraries.

The Thin mode was introduced in node-oracledb 6.0 to remove the dependency on Oracle Instant Client libraries. Please see the node-oracledb 6.0 release announcement

However, we created an optional Thick mode to enable the use of Oracle Client libraries for the features which are not supported in Thin mode . Please see https://node-oracledb.readthedocs.io/en/latest/user_guide/appendix_a.html#oracle-database-features-supported-by-node-oracledb.

Unfortunately, LDAP support is not available in Thin mode now, but we are planning to add it in a future release.

So for now, if you are using LDAP, Thick mode is required.

@karkan20
Copy link
Author

With 5.5.0 version, I am not calling oracledb.initOracleClient() in my database.js before creating the pool.
Still it worked so my understanding is if I do not call initOracleclient then it's in thin mode..

@sharadraju
Copy link
Member

sharadraju commented May 24, 2024

@karkan20 Please let us know your platform and if you are using LDAP? Does your platform have Oracle Client libraries installed?

The Oracle Client libraries will automatically be picked up from PATH libraries (in Windows) or LD_LIBRARY_PATH (in Linux) and this does not require initOracleClient() function to be called.

@karkan20
Copy link
Author

karkan20 commented May 24, 2024 via email

@sharadraju
Copy link
Member

Ok, then your Instant Client Libraries would have been picked from your PATH environment variable in node-oracledb 5.5. So you did not need initOracleClient() then.

Please check https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html#installing-node-js-and-node-oracledb-on-microsoft-windows.

@karkan20
Copy link
Author

Ok so what I understand is before 6.0 version if we don't call specifically initOracleclient and if there is client library available in the oracle home path then it will do the connection.

But post 6.0 release as thin mode being default mode, we have to specifically mention initoracleclient for ldp connection to work.

@sharadraju
Copy link
Member

Ok so what I understand is before 6.0 version if we don't call specifically initOracleclient and if there is client library available in the oracle home path then it will do the connection.

But post 6.0 release as thin mode being default mode, we have to specifically mention initoracleclient for ldp connection to work.

Yes.

@karkan20
Copy link
Author

Thanks for clearing out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants