joeferner / node-oracle

node.js driver to connect with an oracle database.
MIT License
271 stars 99 forks source link

Windows #2

Closed dbountsman closed 11 years ago

dbountsman commented 12 years ago

Is there a possibility to install node-oracle on Windows?

Thanks.

joeferner commented 12 years ago

The latest code does compile in windows but does not currently pass the unit tests.

dbountsman commented 12 years ago

Yep, after successful compilation on windows I have the problem, that the call to the connect method is neither successful nor throws it any exception or error msg. It looks like it doesn't do anything. Thanks.

joeferner commented 12 years ago

I've submitted a question on stackoverflow (http://stackoverflow.com/questions/9279234/oracle-occi-env-createconnection-fails) hopefully someone else might be able to help.

dbountsman commented 12 years ago

Hello Joe, I think that you have to start a new thread before trying creating the oracle::occi::Environment. Look at constructor of https://github.com/mariano/node-db-oracle/blob/master/src/connection.cc and its super class https://github.com/mariano/node-db/blob/master/connection.cc. Well, the pthread_mutex is not the best idea for different OS.

jsen- commented 12 years ago

this helped me: http://thisthread.blogspot.com/2011/07/oracle-occi-for-visual-studio-2010.html

specially the part "b) Code Generation - Runtime Library Ensure ist value is set to /MDd or /MD, meaning Multithreaded (Debug) DLL."

hope it helps

joeferner commented 12 years ago

No luck. I tried the /MD flag and it did not work.

jsen- commented 12 years ago

Hi,

I have a working project in Visual C++ 2010 which compiles well and works (at least I was able to run a few basic queries). Unfortunately, it's about 5-10 times slower then pure occi, and I didn't have time to take a closer look, yet.

I've tested node-db-oracle from Mariano Iglesias, as well, but it apears to be performing similarly.

If you want I can send you those the projects, but please, be aware, it's a super quick and dirty testing setup :)

Best wishes, Martin Ivičič

On Wed, Feb 22, 2012 at 9:05 PM, Joe Ferner < reply@reply.github.com

wrote:

No luck. I tried the /MD flag and it did not work.


Reply to this email directly or view it on GitHub: https://github.com/nearinfinity/node-oracle/issues/2#issuecomment-4119741

"When I read what I write I learn what I think."

joeferner commented 12 years ago

I think this problem has to do with the interaction of the node.exe and the module.dll. I'm going to try and look into the compiler options for node on windows and try to duplicate those to see if it helps

jsen- commented 12 years ago

Hi, if I could help in any way, please let me know, I'm really interested in your project and will try to help you in my little free time as much as possible.

On Thu, Feb 23, 2012 at 7:23 PM, Joe Ferner < reply@reply.github.com

wrote:

I think this problem has to do with the interaction of the node.exe and the module.dll. I'm going to try and look into the compiler options for node on windows and try to duplicate those to see if it helps


Reply to this email directly or view it on GitHub: https://github.com/nearinfinity/node-oracle/issues/2#issuecomment-4141951

"When I read what I write I learn what I think."

amirotin commented 12 years ago

Is there something new about compiling node-oracle on windows?

joeferner commented 12 years ago

No sorry, it doesn't look like the node executable and oracle DLLs are compatible from what I can tell.

ghost commented 12 years ago

Ive compiled the addon aswell as the latest version of Node. When I run the tests I get the following error:

ORA-24550: signal received: Unhandled exception: Code=c0000005 Flags=0

_kpedbg_dmp_stack()+269<-_kpeDbgCrash()+62<-_kpeDbgSignalHandler()+91<-skgesig Win_UnhandledExceptionFilter()+140<-757B003D<-77539022<-77538FB0<-7755BC22<-7577 3395<-774F9EF0<-774F9EC0<-00000000<-0FF0DAED<-0029205D<-775143E4<-75773395<-774F 9EF0<-774F9EC0<-00000000

Anyone else get this error when running on windows?

dbountsman commented 12 years ago

@coatesjable

You can add these lines to sqlnet.ora

DIAG_ADR_ENABLED=OFF DIAG_DDE_ENABLED=FALSE DIAG_SIGHANDLER_ENABLED=FALSE

This action turns off the OCI signal handler and re-enable standard operating system failure processing. Do you try with Oracle 10 or 11 OCI ?

ghost commented 12 years ago

Yeah tried with both 10g &11g. I turned off the settings you recommended and that stopped the Oracle error coming back when executing the tests but now the tests fail silently.

(function (exports, require, module, filename, dirname) { var bindings = require("../build/Release/oracle_bindings"); var oracle = new bindings.OracleClient();

exports.connect = function(settings, callback) { oracle.connect(settings, callback); <-------- fails on this invocation }

exports.OutParam = bindings.OutParam; });

When I run tests using node unit it fails silently. When I use node-inspector i can see it failing at the indicated spot. Could I have incorrectly compiled my binaries?

dbountsman commented 12 years ago

Hi,

I tried to compile with node 0.8.2 and got the error C2664 ( cannot convert parameter 1 from 'uv_loop_t ' to 'uv_handle_t ). I know, that the api changed since 0.7.9 and uv_ref and uv_unref expect uv_handle_t * instead of 'uv_loop_t *. Is it planed to port to node 0.8.?

dbountsman commented 11 years ago

Are there some changes or workarounds concerning the installation on Windows? Thanks.

bomsy commented 11 years ago

try this module on windows https://npmjs.org/package/node-odp

dbountsman commented 11 years ago

Thanks, it works now.