loopback icon indicating copy to clipboard operation
loopback copied to clipboard

Install of ORACLE connector during create DS still requires manual steps

Open cgole opened this issue 10 years ago • 0 comments

Create a datasource and specifying yes to install loopback-connector-oracle fails with error below, the install script should handle setting the LD_LIBRARY_PATH & running apic loopback:refresh.

Steps: npm uninstall -g apiconnect npm -g cache clear rm -rf ~/.apiconnect npm i -g apiconnect --registry http://apimdev1136.hursley.ibm.com:55501 apic loopback apicdemo cd apicdemo [root@mcRHVM apicdemo]# apic create --type datasource ? Enter the data-source name: Oracle ? Select the connector for Oracle: Oracle (supported by StrongLoop) Connector-specific configuration: ? host: 9.42.89.184 ? port: 1521 ? user: SCOTT ? password: ********* ? database: orcl ? Install loopback-connector-oracle@^2.4 Yes normalizeTree â ..... .......

[email protected] install /root/apicdemo/node_modules/loopback-oracle-installer node pkginstall.js Downloading/Extracting http://7e9918db41dd01dbf98e-ec15952f71452bc0809d79c86f5751b6.r22.cf1.rackcdn.com/loopback-oracle-Linux-x64-abi47-1.8.0.tar.gz http://7e9918db41dd01dbf98e-ec15952f71452bc0809d79c86f5751b6.r22.cf1.rackcdn.com/loopback-oracle-Linux-x64-abi47-1.8.0.tar.gz is now extracted to /root/apicdemo/node_modules

/root/strong-oracle.rc

"strong-oracle.rc" has been created in $HOME. Please manually add the following to your ".bash_profile":

source /root/strong-oracle.rc

If you do not use bash as your default shell, please remember to set $LD_LIBRARY_PATH prior to using node:

export LD_LIBRARY_PATH="/root/apimdemo/node_modules/loopback-connector-oracle/node_modules/instantclient:/root/apicdemo/node_modules/instantclient"

The node-oracle module and Oracle specific libraries have been installed in /root/apicdemo/node_modules/loopback-oracle-installer. Alternatively, you can add that path to /etc/ld.so.conf (sudo required):

echo "/root/apicdemo/node_modules/instantclient" | sudo tee -a /etc/ld.so.conf.d/loopback_oracle.conf sudo ldconfig

Done running loopback generator

Updating swagger and product definitions Error: Cannot load the LoopBack application: WARNING: LoopBack connector "oracle" is not installed as any of the following modules:

./connectors/oracle loopback-connector-oracle

To fix, run:

npm install loopback-connector-oracle Cannot load the LoopBack application: WARNING: LoopBack connector "oracle" is not installed as any of the following modules:

./connectors/oracle loopback-connector-oracle

To fix, run:

npm install loopback-connector-oracle Please fix the problem and run apic loopback:refresh

Please fix the problem and run apic loopback:refresh

Manually ran steps below, but this should be handled by script.

[root@mcRHVM apicdemo]# export LD_LIBRARY_PATH="/root/apimdemo/node_modules/loopback-connector-oracle/node_modules/instantclient:/root/apicdemo/node_modules/instantclient" [root@mcRHVM apicdemo]# apic loopback:refresh

Updating swagger and product definitions Created /root/apicdemo/definitions/apicdemo.yaml swagger description [root@mcRHVM apicdemo]#

https://github.ibm.com/apimesh/scrum-platform-foundation/issues/816

cgole avatar Jul 21 '16 19:07 cgole