Unified CABI / Jaspersoft java exception "Error filling report Arguments.." running Asset Details report

book

Article ID: 8368

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

In Unified CABI / Jaspersoft  if you try to run the Asset Details report from the Library list you will get the following exception:

Error Details

Error Message

There was an error on the server. Try again or contact site administrators. (Error UID: 1d189d06-369b-42cf-bd92-f748d8bafe47)






Excerpt from: /opt/CA/SharedComponents/CABI/apache-tomcat/webapps/jasperserver-pro/WEB-INF/logs/jasperserver.log
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

com.jaspersoft.jasperserver.api.JSException: Error filling report Arguments: at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$FillResultListener.reportFillError(EngineServiceImpl.java:1345) at net.sf.jasperreports.engine.fill.BaseFillHandle.notifyError(BaseFillHandle.java:216) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:138) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:924) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:169) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:880) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1829) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runWithDataSource(EngineServiceImpl.java:1169) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:1051) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:946) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: Asset_Detail. at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:344) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:169) at com.jaspersoft.commons.util.JSControlledJdbcQueryExecuter.createDatasource(JSControlledJdbcQueryExecuter.java:114) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1129) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:696) at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:437) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:548) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123) ... 10 more Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null' at line 34
Query is: SELECT e.entity_name,
d.model_key,
d.sys_desc,
d.cust_asset_description,
d.cust_asset_contractenddate,
d.cust_asset_contractstartdate,
d.cust_asset_contractnumber,
d.cust_asset_office,
d.location,
d.contact_person,
d.cust_asset_organization,
d.cust_asset_owner,
d.cust_asset_tag,
d.sys_OID,
d.cust_asset_ID,
d.last_successful_poll,
d.last_reboot,
d.model_creator,
d.create_time,
d.serial_nbr,
d.landscape_h,
d.fw_rev,
d.model_h,
d.device_type,
vendor.vendor_name,
modelclass.mclass_name,
modeltype.mtype_name,
d.MAC, d.IP,
d.model_name
FROM devicemodel d
INNER JOIN modeltype modeltype ON d.mtype_h=modeltype.mtype_h
INNER JOIN vendor vendor ON d.vendor=vendor.vendor
INNER JOIN modelclass modelclass ON d.model_class=modelclass.model_class
INNER JOIN entity e ON d.model_key=e.current_model_key and model_key IS NULL
null
at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:138)
at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106)
at org.mariadb.jdbc.MySQLStatement.executeQueryEpilog(MySQLStatement.java:266)
at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:289)
at org.mariadb.jdbc.MySQLStatement.executeQuery(MySQLStatement.java:302)
at org.mariadb.jdbc.MySQLPreparedStatement.executeQuery(MySQLPreparedStatement.java:106)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:310)

Cause

 

The reason for SQL Error is due to wrong navigation by user.

The Asset Details report is a "drilldown report". When a user navigates to the "drillldown reports" folder and chooses a report from that folder this exception occurs as report parameters
  are missing. These parameters are designed to be passed directly when drilling down from a top level report.

It is not recommended to run the drilldown reports directly as input to drilldown reports will come from main report.

Environment

CABI / Jaspersoft 6.3, 6.4.3, 7.1.1, 7.1.1.1

Resolution

Do not run "drilldown reports" directly as they are supposed to be executed as sub-report of other main report from which they receive the needed parameters

The correct way to access the reports is as follows:

Attachments