jdbc connection realted node js is deployed in apigee edge as apiproxy, i get exception

Not applicable
var jdbc = require('trireme-jdbc');

var db = new jdbc.Database({
    url: 'jdbc:datadirect:openedge://hostname:portno;DatabaseName=dbname',
    properties: {
        user: 'username',
        password: 'password',
    },
    minConnections: 1,
    maxConnections: 20,
    idleTimeout: 100
});

db.execute('SELECT item, description FROM item where item = ?', ['01-10-239'], function(err, result, rows) {
    rows.forEach(function(row) {
        console.log('Row: %j', row);
    });
});

The exception i see in apigee-edge logs are: "Script node executed prematurely: syntax error at module.js:439 at module.js:474 at module.js:356 at module.js:312 at module.js:497 at startup (trireme.js:142) at trireme.js:923" exception

But this code runs fine locally using command "trireme app.js".

Would appreciate if any one can provide pointers for the root cause of the error.

1 1 224
1 REPLY 1

Not applicable

People, any suggestion you have for me? My guess is it might because the trireme-jdbc version on APIGEE EDGE private cloud may be old. Other than getting APIGEE patch for fixing this is there anything else i can try at my end?

Also i see this error is during compilation itself. I am trying to connect to a db by loading db specfic jdbc driver jar file. I looked at most options i could think off, is there a way to connect to db, without loading jar file? (Its is broad question :))