{"action":"opened","issue":{"url":"https://api.github.com/repos/strongloop/strongloop/issues/330","repository_url":"https://api.github.com/repos/strongloop/strongloop","labels_url":"https://api.github.com/repos/strongloop/strongloop/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/strongloop/issues/330/comments","events_url":"https://api.github.com/repos/strongloop/strongloop/issues/330/events","html_url":"https://github.com/strongloop/strongloop/issues/330","id":182276818,"number":330,"title":"Error : \"Cannot redefine property: getConnection\" using slc run to start a server","user":{"login":"amerishk","id":9842490,"avatar_url":"https://avatars.githubusercontent.com/u/9842490?v=3","gravatar_id":"","url":"https://api.github.com/users/amerishk","html_url":"https://github.com/amerishk","followers_url":"https://api.github.com/users/amerishk/followers","following_url":"https://api.github.com/users/amerishk/following{/other_user}","gists_url":"https://api.github.com/users/amerishk/gists{/gist_id}","starred_url":"https://api.github.com/users/amerishk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amerishk/subscriptions","organizations_url":"https://api.github.com/users/amerishk/orgs","repos_url":"https://api.github.com/users/amerishk/repos","events_url":"https://api.github.com/users/amerishk/events{/privacy}","received_events_url":"https://api.github.com/users/amerishk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-11T14:20:36Z","updated_at":"2016-10-11T14:20:36Z","closed_at":null,"body":"Hello,\r\n\r\nWhen using oracledb (node-oracle) module to establish a connection in a SLC Project, we are getting \"error: uncaughtException: Cannot redefine property: getConnection \". This is happening whenever we use \"SLC RUN\" to start the node server. On the other than, when we use \"NODE .\" everything works. We asked the same issue in node-oracledb (git) (link https://github.com/oracle/node-oracledb/issues/505) but got redirected to Strongloop team. \r\n\r\nThe issue is with the getConnection property of Oracledb instance present in Oracledb.js. This attribute is writable as true. If we add _\"configurable: true\"_ to the getConnection property all works fine. \r\n\r\nCan you please look into this issue as the earliest?\r\n\r\nBelow is the sample code: \r\n\r\nvar oracledb = require('oracledb'); // while start-up at this line we are getting the ERROR.\r\n\r\noracledb.getConnection(\r\n{\r\nuser : \"test\",\r\npassword : \"test\",\r\nconnectString : \"localhost/XE\"\r\n},\r\nfunction(err, connection)\r\n{\r\nif (err) { console.error(err.message); return; }\r\n\r\nconnection.execute(\r\n  \"SELECT department_id, department_name \" +\r\n    \"FROM departments \" +\r\n    \"WHERE manager_id < :id\",\r\n  [110],  // bind value for :id\r\n  function(err, result)\r\n  {\r\n    if (err) { console.error(err.message); return; }\r\n    console.log(result.rows);\r\n  });\r\n});\r\n\r\n### Expected result\r\n\r\nServer should have started successfully without any issues.\r\n\r\n### Actual result (if bug)\r\n\r\nOn server start-up using SLC RUN Command, we are getting below error (error log):\r\n\r\n_error: uncaughtException: Cannot redefine property: getConnection_ date=Mon Oct 10 2016 21:46:43 GMT+0530 (India Standard Time), pid=11016, uid=null, gid=null, cwd=D:\\Project, execPath=C:\\Program Files\\nodejs\\node.exe, version=v4.2.3, argv=[C:\\Program Files\\nodejs\\node.exe, server\\server.js], rss=99450880, heapTotal=74440704, heapUsed=52147416, loadavg=[0, 0, 0], uptime=48725.2610621, trace=[column=null, file=null, function=Function.defineProperty, line=null, method=defineProperty, native=true, column=10, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js, function=install, line=259, method=null, native=false, column=38, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js, function=null, line=59, method=null, native=false, column=32, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js, function=null, line=133, method=null, native=false, column=null, file=null, function=Array.forEach, line=null, method=forEach, native=true, column=8, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js, function=each, line=133, method=null, native=false, column=3, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js, function=around, line=55, method=null, native=false, column=40, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js, function=Object.after, line=19, method=after, native=false, column=9, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\probes\\oracledb.js, function=oracleBase, line=20, method=null, native=false, column=10, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\probes\\oracledb.js, function=oracledb, line=15, method=null, native=false, column=50, file=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\agent.js, function=Module.module.__proto__.require, line=188, method=module.__proto__.require, native=false, column=17, file=module.js, function=require, line=385, method=null, native=false, column=16, file=D:\\Project\\common\\adapters\\adapterv10\\adapterv10.js, function=, line=23, method=null, native=false, column=26, file=module.js, function=Module._compile, line=435, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=442, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=356, method=load, native=false], stack=[TypeError: Cannot redefine property: getConnection,     at Function.defineProperty (native),     at install (C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js:259:10),     at C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js:59:38,     at C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js:133:32,     at Array.forEach (native),     at each (C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js:133:8),     at around (C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js:55:3),     at Object.after (C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\proxy.js:19:40),     at oracleBase (C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\probes\\oracledb.js:20:9),     at oracledb (C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\probes\\oracledb.js:15:10),     at Module.module.__proto__.require (C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\strongloop\\node_modules\\strong-agent\\lib\\agent.js:188:50),     at require (module.js:385:17),     at Object.<anonymous> (D:\\Project\\common\\adapters\\adapterv10\\adapterv10.js:23:16),     at Module._compile (module.js:435:26),     at Object.Module._extensions..js (module.js:442:10),     at Module.load (module.js:356:32)]\r\n\r\n### Additional information (Node.js version, LoopBack version, etc)\r\n\r\nNode JS Version - 0.10.40 and 4.2.3 ( we tried on both versions)\r\nloopback version - 5.0.1 and 6.0.1 (we tried on both versions)\r\nNode-oracledb / Oracledb Versoin - 1.11\r\nOracle 11g XE "}}
{"actor":{"display_login":"amerishk"}}