Bonita 7.5 and compatible Jasper report

Hello everyone,
I’m working on a report using Jasper reports and Bonita 7.5. It gives me an error when I’m trying passing date parameters. At first it seems an error of compatibility with Jasper, I’m trying with Jasper Studio, v 6.5 and v.5.0.4 but in doesn’t work. By hassard, is there someone who has worked and save this problem?

Thanks in advance for suggestions.

Hi Romualdo,
In my log I see there’s something wrong with the data type:
"Caused by: org.bonitasoft.engine.connector.ConnectorException: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:

  1. java.sql.Date cannot be resolved to a type
    value = ((java.sql.Date)field_dtdeme.getValue()); //$JR_EXPR_ID=14$
    <----------->

  2. java.sql.Date cannot be resolved to a type
    value = ((java.sql.Date)field_dtdeme.getOldValue()); //$JR_EXPR_ID=14$
    <----------->

  3. java.sql.Date cannot be resolved to a type
    value = ((java.sql.Date)field_dtdeme.getValue()); //$JR_EXPR_ID=14$
    <----------->
    3 errors

    at org.bonitasoft.connectors.jasper.CreateReportFromDataBase.executeBusinessLogic(CreateReportFromDataBase.java:214)
    at org.bonitasoft.engine.connector.AbstractConnector.execute(AbstractConnector.java:77)
    at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.execute(SConnectorAdapter.java:73)
    … 6 more
    Caused by: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:

  4. java.sql.Date cannot be resolved to a type
    value = ((java.sql.Date)field_dtdeme.getValue()); //$JR_EXPR_ID=14$
    <----------->

  5. java.sql.Date cannot be resolved to a type
    value = ((java.sql.Date)field_dtdeme.getOldValue()); //$JR_EXPR_ID=14$
    <----------->

  6. java.sql.Date cannot be resolved to a type
    value = ((java.sql.Date)field_dtdeme.getValue()); //$JR_EXPR_ID=14$
    <----------->
    3 errors

    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:204)
    at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:240)
    at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:226)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:481)
    at org.bonitasoft.connectors.jasper.CreateReportFromDataBase.createJasperReportFromDataBase(CreateReportFromDataBase.java:307)
    at org.bonitasoft.connectors.jasper.CreateReportFromDataBase.executeBusinessLogic(CreateReportFromDataBase.java:212)"
    In this case I’ve tested with MS-SQL R 2008 but with postgresql is the same type of error. If there an idea probably I’ll do samething next week, thanks.

I recently used BonitaSoft 7.3.3 with JasperStudio 5.6.0 and got it rolling as expected, what does your logs display as an error?

Were you able to solve your problem?

Not really, perhaps with a newer version ex. Bonita 7.6 it could work but i’m using 7.5 and i’ve using other type of field to around my problem. If you have your experience or other ideas, thanks.
Wr

Yeah, I’ve migrated my version from 7.3.3 to 7.5.4 and then my report that has a sub report went to give an error very similar to your

I tried to migrate to version 7.6.1 and also did not solve, the strange thing is that in an older version (7.3.3) it usually works however in a newer (7.5.4 or 7.6.1) of that Bug

I was able to solve my problem by installing an updated JAR version of jasperreports

https://sourceforge.net/projects/jasperreports/files/jasperreports/JasperReports%206.5.1/jasperreports-6.5.1.jar/download

I hope it helps you

Also I figured it out that I can work around using only string and integer variables.

I have same issue with java.lang.Long… I’m using iReport Designer 5.1.0

It is a currently known issue of the Jasper Connector that should be fixed in the maintenance release 7.6.3 (see my answer on this other post: https://community.bonitasoft.com/node/28628#node-28635)