bigdecimal

Error retrieving NUMBER field from Oracle to Bonita variable

Hi,

When retrieving a field defined as NUMBER(10) in Oracle database into a variable defined as Integer I get the following conversion error message

Java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer
at org.bonitasoft.engine.data.instance.model.impl.SIntegerDataInstanceImpl.setValue

The same happens if the variable is defined as long or double and in the BDM.
e.g. when having it as double, the error is "java.math.BigDecimal cannot be cast to java.lang.Double"

BigDecimal Problem

Hi Community!

I'm trying to use some groovy code to do an update according to a list. Well, I'm having some bad time, probably because my code have something wrong.

import groovy.sql.Sql

def lista = []

Sql sql = BonitaSql.newInstance("jdbc:oracle:thin:@MYIPADRESS:orcl1", "NAME", "PASS",new oracle.jdbc.OracleDriver())
sql.eachRow "SELECT CD_USUARI FROM VULTIMOLOG WHERE DAT < (sysdate - 20)", {lista +=it.CD_USUARI}
sql.close()

Notifications