Necesito conectar con postgres usando la clase Sql de groovy tengo un ejemplito pero me da un error

1
0
-1

Necesito conectar con postgres usando la clase Sql de groovy tengo un ejemplito pero me da un error

Comments

Submitted by Lionel Palacin on Wed, 06/08/2016 - 01:09

Hi Antonio,

Could you please share the error message you got with us so I can take a look?

PS: Sorry I can't write in Spanish, but you can answer in Spanish if you wish, my high school lessons and Google translate will do the job.

Cheers

Submitted by antonio.espinosa on Fri, 06/10/2016 - 16:54

Esta es el codigo de la conección, es el valor que le pongo por defecto a una variable de proceso en el studio de bonita

import groovy.sql.Sql;
def list=[]
Sql sent=BonitaSql.newInstance("jdbc:postgresql://localhost:5432/dbBonita","postgres","postgres", new org.postgresql.Driver())
sent.eachRow("select * from tabla",{row -> list.add(row.col)})
return list

este es el error que me da cuando inicio el proceso
USERNAME=iriam | org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: PROCESS_DEFINITION_ID=6178417214401564772 | PROCESS_NAME=Pool1 | PROCESS_VERSION=1.0 | org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

BScript6.groovy: 5: unable to resolve class org.postgresql.Driver
@ line 5, column 101.

Bonita","postgres","postgres",new org.po

                             ^

1 error

No answers yet.
Notifications