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 strongloop/loopback-connector-oracle#193
Assignees

Comments

@bigal-cloud
Copy link

@bigal-cloud 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

This comment has been minimized.

Copy link
Member

@bajtos 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

This comment has been minimized.

Copy link
Member

@bajtos bajtos commented Jul 4, 2019

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

@bigal-cloud

This comment has been minimized.

Copy link
Author

@bigal-cloud 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

This comment has been minimized.

Copy link
Author

@bigal-cloud bigal-cloud commented Jul 5, 2019

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

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

@Tavisco

This comment has been minimized.

Copy link

@Tavisco 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

This comment has been minimized.

Copy link
Contributor

@dhmlau 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 label Sep 27, 2019
@agnes512 agnes512 mentioned this issue Sep 30, 2019
18 of 25 tasks complete
@raymondfeng

This comment has been minimized.

Copy link
Member

@raymondfeng raymondfeng commented Oct 17, 2019

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

This comment has been minimized.

Copy link
Contributor

@emonddr emonddr commented Oct 22, 2019

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

@Tavisco

This comment has been minimized.

Copy link

@Tavisco 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

This comment has been minimized.

Copy link
Member

@raymondfeng raymondfeng commented Nov 1, 2019

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

raymondfeng added a commit to strongloop/loopback-connector-oracle that referenced this issue Nov 1, 2019
raymondfeng added a commit to strongloop/loopback-connector-oracle that referenced this issue Nov 1, 2019
raymondfeng added a commit to strongloop/loopback-connector-oracle that referenced this issue Nov 1, 2019
@raymondfeng

This comment has been minimized.

Copy link
Member

@raymondfeng raymondfeng commented Nov 1, 2019

Please try loopback-connector-oracle@4.5.0

@Tavisco

This comment has been minimized.

Copy link

@Tavisco Tavisco commented Nov 1, 2019

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

@dhmlau dhmlau added this to the Oct 2019 milestone milestone Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.