Need help with postgres read query

I am running Community Studio 7.2.2 on Lubuntu 15.10, using a docker postgres container.

I have a small test case - just reading a table.

diagram

I can’t get it to run.

Script is:

import groovy.sql.Sql;
import java.sql.Driver;
def result=[];

Sql sql=BonitaSql.newInstance("jdbc:postgresql://172.17.0.2:5432/HFDataProd","bonita_db_user","bpm", Driver)
sql.eachRow("select * from customer") {row -> result.add(row.customerid)};

return result;

The bos file and the logs I get on windows and lubuntu Studio are in https://drive.google.com/open?id=0B7ig1ZvVKJMid3BObkdSYkxkMWM

There is, of course, a bunch of other stuff in the bos file - I packed up the environment at the time.

Have you added the Postgreql driver to the tomcat/lib folder? I use that rather than the java.sql.Driver.

regards
Seán

PS: If this reply answers your question, please mark a resolved.

Sean, I had used Postgres, but that didn’t work… I’ll retry now, with the driver in place.

But Is this my issue here?

BonitaSql(java.lang.String, java.lang.String, java.lang.String, java.lang.Class)"
org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: PROCESS_DEFINITION_ID=8174569622484845343 | PROCESS_NAME=Pool2 | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=5001 | ROOT_PROCESS_INSTANCE_ID=5001 | FLOW_NODE_DEFINITION_ID=6245033310847120318 | FLOW_NODE_INSTANCE_ID=100002 | FLOW_NODE_NAME=Step1 | CONNECTOR_IMPLEMENTATION_CLASS_NAME=customerdata | CONNECTOR_INSTANCE_ID=80001 | groovy.lang.GroovyRuntimeException: Could not find matching constructor for: BonitaSql(java.lang.String, java.lang.String, java.lang.String, java.lang.Class)

And if it is, how to fix?

Thanks

Sean, I switched to postgres, still have the bonitasql error - I think that is my problem. Any help appreciated!

Changing the script, using postgres:

Script: now -

import groovy.sql.Sql;

import java.sql.Driver;

def result=[];

Sql sql=Sql.newInstance("jdbc:postgresql://172.17.0.2:5432/HFDataProd","bonita_db_user","bpm", Driver)
sql.eachRow("select * from customer") {row -> result.add(row.customerid)};

return result;

Fails, with this being the significant error (I THINK):

ROOT_PROCESS_INSTANCE_ID=5002 | FLOW_NODE_DEFINITION_ID=6931078392520906509 | FLOW_NODE_INSTANCE_ID=100004 | FLOW_NODE_NAME=Step1 | CONNECTOR_IMPLEMENTATION_CLASS_NAME=customerdata | CONNECTOR_INSTANCE_ID=80002 | groovy.lang.GroovyRuntimeException: Could not find matching constructor for: groovy.sql.Sql(java.lang.String, java.lang.String, java.lang.String, java.lang.Class)

Help is being appreciated actively!

Thanks