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

Connection is undefined or null #95

Open
RobertZito opened this issue Mar 14, 2014 · 1 comment
Open

Connection is undefined or null #95

RobertZito opened this issue Mar 14, 2014 · 1 comment

Comments

@RobertZito
Copy link

I am new to this package, I have worked with Hibernate so I kind of understand the ORM. But the document indicates that if the dB is specified it assumes the connection is made. So I have the below in my database.json but I keep getting connection is null or undefined if I attempt just the basic sample. Can someone show me a connection example with node Oracle?

"oracle": {
    "driver": "oracle",
    "hostname": "localhost",
    "port": 1521,
    "database": "hr",
    "user": "xxxe",
    "password": "password"
}  
@ioneyed
Copy link

ioneyed commented Mar 31, 2014

Do you have a TNSNAMES.ora file already? I had to set the environment variable TNS_ADMIN and point it to my projects TNS name file - http://stackoverflow.com/questions/5568342/how-can-i-configure-my-oracle-tnsnames-file-location

Here is my example of the connection string:

persist.setDefaultConnectOptions({
"driver": "oracle",
"tns": "SHR3STAG",
"user": "redacted",
"password": "redacted"
});

Outside of a tns file try assigning the connection details with persist.setDefaultConnectOptions or make sure your database.json file is as the example (in terms of structure) and at the ROOT level of your project (seems like this should be configurable).

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

2 participants