mariano / node-db-oracle

Oracle database bindings for Node.js
http://nodejsdb.org
141 stars 34 forks source link

OSX connection issues #42

Open rbrcurtis opened 12 years ago

rbrcurtis commented 12 years ago

Good morning,

I'm hoping you all can help me out. I'm just trying to connect to an oracle db on a mac pro running Lion. I've installed the 64bit instantclient (10.2.0.4.0) and gotten db-oracle installed successfully. When I try to connect, nothing happens. The callback never fires, no events get emitted, and my sadness is total. I DO get a warning (and the port is not standard, as you can see):


coffee> oracle=require 'db-oracle'
{ Query: [Function],
  Database: 
   { [Function]
     COLUMN_TYPE_STRING: 0,
     COLUMN_TYPE_BOOL: 7,
     COLUMN_TYPE_INT: 2,
     COLUMN_TYPE_NUMBER: 3,
     COLUMN_TYPE_DATE: 4,
     COLUMN_TYPE_TIME: 5,
     COLUMN_TYPE_DATETIME: 6,
     COLUMN_TYPE_TEXT: 1,
     COLUMN_TYPE_SET: 8 } }
coffee> db = new oracle.Database {hostname: 'example.com', user: 'user', password: 'pass', port: 1530, database: 'adb'}
{}
coffee> db.connect (err)->console.log 'connected', arguments
WARNING: ev_ref is deprecated, use uv_ref
undefined
coffee> 
coffee> db.isConnected()
false
coffee> 

I tried running sqlplus with the instantclient to check that I could connect to the db. it seg faults. That's apparently a known issue with the 64bit client and they who wish to overcome use the 32bit client. So I installed the 32bit client, and reinstalled db-oracle. I'm able to connect to the db with sqlplus with no problems, but even just requiring db-oracle fails:

coffee> oracle = require 'db-oracle'
Error: dlopen(/Users/rcurtis/Code/bigbang/node_modules/db-oracle/build/Release/oracle_bindings.node, 1): Symbol not found: __ZTIN6oracle4occi12SQLExceptionE
  Referenced from: /Users/rcurtis/Code/bigbang/node_modules/db-oracle/build/Release/oracle_bindings.node
  Expected in: flat namespace
 in /Users/rcurtis/Code/bigbang/node_modules/db-oracle/build/Release/oracle_bindings.node
    at Object.Module._extensions..node (module.js:485:11)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/Users/rcurtis/Code/bigbang/node_modules/db-oracle/db-oracle.js:18:15)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
coffee> 

I don't really care if I'm using the 32bit or the 64, as long as it works. Suggestions?

kontrafiktion commented 11 years ago

I have given up on using Node+Oracle on OSX, just switched to a Linux VM (running on OSX). There is a 32Bit version of Node, but I do not know if that just opens another can of worms ...