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

Model discovery not working with Oracle connector & CDB instance #3296

Closed
bigal-cloud opened this issue Jul 2, 2019 · 12 comments · Fixed by loopbackio/loopback-connector-oracle#193
Assignees
Labels
bug db:Oracle Topics specific to Oracle database

Comments

@bigal-cloud
Copy link

bigal-cloud commented Jul 2, 2019

Steps to reproduce

  1. Have running Oracle CDB/PDB instance
  2. lsnrctl services to get connection info:
Service "mypdb" has 1 instance(s).
  Instance "oracleal", status READY, has 2 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:1 max:1022 state:ready
         DISPATCHER <machine: dev-3867, pid: 15272>
         (ADDRESS=(PROTOCOL=tcp)(HOST=dev-3867)(PORT=49939))
      "DEDICATED" established:2 refused:0 state:ready
         LOCAL SERVER
  1. lb4 datasource:
{
  "name": "ABX",
  "connector": "oracle",
  "tns": "",
  "host": "dev-3867",
  "port": 49939,
  "user": "fx_owner",
  "password": "dev",
  "database": "mypdb"
}
  1. npm run build
  2. lb4 discover - select a model and hit enter

Current Behavior

PS C:\Users\Lake\Documents\test-adapter\serverx\serverx> lb4 discover
? Select the connector to discover ABX
? Select the models which to discover RFF_RESPONSE
events.js:170
      throw er; // Unhandled 'error' event
      ^

Error: NJS-002: invalid pool
Emitted 'error' event at:
    at Immediate.setImmediate (C:\Users\Lyme\AppData\Roaming\npm\node_modules\@loopback\cli\node_modules\yeoman-generator\lib\index.js:436:22)
    at processImmediate (internal/timers.js:443:21)
PS C:\Users\Lyme\Documents\jtds-test-adapter\serverx\serverx>

Expected Behavior

To create a model

Link to reproduction sanbox

Additional information

It was working fine in previous versions

Related Issues

See Reporting Issues for more tips on writing good issues

@bigal-cloud bigal-cloud added the bug label Jul 2, 2019
@bajtos
Copy link
Member

bajtos commented Jul 4, 2019

@bigal-cloud thank you for reporting the issue. What is the version of @loopback/repository and loopback-connector-oracle that you are using?

It was working fine in previous versions

Please be more specific, what is the last version where this worked and what is the first version where it stopped to work?

@bajtos
Copy link
Member

bajtos commented Jul 4, 2019

@raymondfeng you are most familiar with the Oracle connector, PTAL.

@bigal-cloud
Copy link
Author

bigal-cloud commented Jul 5, 2019

Hello @bajtos , thanks for replying.

I am using:
@loopback/repository v 1.8.2
loopback-connector-oracle v 4.2.0

For the other questions I need a little more time.

@bigal-cloud
Copy link
Author

The last working version was:
@loopback/cli@1.16.0

The first non working version was:
@loopback/cli@1.17.0

@Tavisco
Copy link

Tavisco commented Aug 23, 2019

Getting the exact same results over here.

I'm using those versions:

@loopback/repository@1.12.0
loopback-connector-oracle@4.3.0
@loopback/cli@1.21.4

@dhmlau dhmlau added the 2019Q4 label Sep 12, 2019
@dhmlau
Copy link
Member

dhmlau commented Sep 12, 2019

I think this is something we should take a look and try to reproduce from our end in Q4, if not sooner.

@bajtos bajtos changed the title Oracle connector not working properly for CDB instance Model discovery not working with Oracle connector & CDB instance Sep 27, 2019
@bajtos bajtos added the db:Oracle Topics specific to Oracle database label Sep 27, 2019
@raymondfeng
Copy link
Contributor

Can you try to install https://github.com/oracle/node-oracledb and see if https://github.com/oracle/node-oracledb/blob/master/examples/example.js is working for you? We use oracledb behind the scene.

@emonddr
Copy link
Contributor

emonddr commented Oct 22, 2019

@bigal-cloud @Tavisco , please see @raymondfeng 's comment. :)

@Tavisco
Copy link

Tavisco commented Oct 22, 2019

Hi @emonddr sorry for the late reply. I don't have access write to the database I'm testing with, so i've ran only the last part of the example.js file that selects the current date from dual, and it worked as expected.

@raymondfeng
Copy link
Contributor

I'm able to reproduce the problem now. Will take a look tomorrow.

raymondfeng added a commit to loopbackio/loopback-connector-oracle that referenced this issue Nov 1, 2019
raymondfeng added a commit to loopbackio/loopback-connector-oracle that referenced this issue Nov 1, 2019
raymondfeng added a commit to loopbackio/loopback-connector-oracle that referenced this issue Nov 1, 2019
@raymondfeng
Copy link
Contributor

Please try loopback-connector-oracle@4.5.0

@Tavisco
Copy link

Tavisco commented Nov 1, 2019

Using loopback-connector-oracle@4.5.0 I was able to run lb4 discover successfully, thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug db:Oracle Topics specific to Oracle database
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants