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

@tjanczuk : iisnode and node-oracledb is it possible ?? #529

Open
AmbarSoni777 opened this issue Sep 12, 2016 · 5 comments
Open

@tjanczuk : iisnode and node-oracledb is it possible ?? #529

AmbarSoni777 opened this issue Sep 12, 2016 · 5 comments

Comments

@AmbarSoni777
Copy link

AmbarSoni777 commented Sep 12, 2016

Application has thrown an uncaught exception and is terminated:
Error: The specified module could not be found.

?\C:\Program Files\iisnode\www\express\node_modules\oracledb\build\Release\oracledb.node

** @tjanczuk : Is it possible to node-oracledb with iisnode ?

@AmbarSoni777 AmbarSoni777 changed the title iisnode and node-oracledb @tjanczuk : iisnode and node-oracledb is it possible ?? Sep 12, 2016
@brunodenis
Copy link

Yes, it is possible. More than a pain to compile but possible and working fine

@luisjuniorj
Copy link

@brunodenis, compilation ok, but same error... any tips?

@ghaefele
Copy link

@brunodenis, any additional tips how to get iisnode and oracledb work together?

On a Windows 10 development machine (oracledb compiled correctly and works fine outside iis + iisnode) I get:

Application has thrown an uncaught exception and is terminated:
Error: The specified module could not be found.

On a Windows Server 2008 (oracledb copied from development machine, oracledb works fine outside iis + iisnode) I get:

Application has thrown an uncaught exception and is terminated:
Error: %1 is not a valid Win32 application.

I am sure everything is in 64-bit (node, iis, oracledb...).
Has anybody an oracledb application working correctly inside iis + iisnode?
see issue #411

@ghaefele
Copy link

After some trial-and error experience I can confirm that iisnode and oracledb are working fine together.

In my case I had a full 64-bit environment (node, iisnode, iis, oracledb built with 64-bit, oracle 64-bit clients, all environment variables set, properly configured web.config, correct MS Run-Time Library installed).

The error "The specified module could not be found" resulted from missing permissions for the IIS user on the oracle client folder (oci.dll). The IIS-process could not read the oci.dll on which oracledb depends. During development and outside IIS, my account had permissions on this folder.

The error " %1 is not a valid Win32 application" resulted from a mixed 32-bit and 64-bit environment. If everything is 64-bit you will not get this error. The Microsoft utility "dumpbin" (Visual Studio command prompt) was very useful to figure out the problem (dumpbin /headers).

@nicolas-bonnel
Copy link

Following @ghaefele last answer, I finally managed to make it work. I also had a problem with Path environment variable being changed: all elements were still here, but not in the right order. The location to oracledb installation must be at the begining of Path. I currently have a ugly line of code to remove those two element of Path and prepend to it :

const oracleDirs = ['C:\\oracle\\instantclient','C:\\oracle\\instantclient\\sdk\\include']
process.env.Path = oracleDirs.join(';') + process.env.Path.split(';').filter(p => p.indexOf('oracle')<0).join(';')
const oracledb = require('oracledb')

I don't know how to preserve order in Path when launching the process with iis(node), even when it's the same user that launch the process than in command line, the Path order is messed.

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

No branches or pull requests

5 participants