[SOLVED] NJS-045 ORA-01804: Error while trying to retrieve text for error ORA-01804

This is a solution for an exception occurred when you try to run Node.js application required oracledb module.

Problem
Unable to run Node.js application because of the ORA-01804 exception:

Error: NJS-045: cannot load the oracledb add-on binary for Node.js 6.11.4 (linux, x64)
Cannot load /home/.../node_modules/oracledb/build/Release/oracledb.node
Error while trying to retrieve text for error ORA-01804

Node-oracledb installation instructions: https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
You must have 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with ldconfig.
If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from 
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

    at Object. (/home/.../node_modules/oracledb/lib/oracledb.js:68:13)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object. (/home/.../node_modules/oracledb/index.js:1:80)
    at Module._compile (module.js:570:32)

 

Cause
Oracle Database Instant Client is in different version than used Oracle Database – i.e. you use instatclient 12.2.0.1.0 and Oracle Databse XE 11g R2.

 

Solution
Use proper version of Oracle Database Instant Client.

  • For Oracle Database 12c: 12.2.0.1.0 or higher
  • For Oracle Database 11g XE R2: 11.2.0.4.0

You can download it from here:


1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
[SOLVED] NJS-045 DPI-1047: 64-bit Oracle Client library cannot be loaded – Better-Coding Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
trackback

[…] install Oracle Database Instant Client libraries in proper version. If you use wrong version you can get theĀ ORA-01804 exception. […]

Close Menu