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

Document ID : KB000008368
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

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

The server has encountered an error. Please excuse the inconvenience.

Error Message

Error filling report

Error Trace

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)

Environment:
any
Cause:

The reason for SQL Error is due to wrong navigation by user. The Asset Details report is a "drilldown report". When user navigate to "drillldown reports" folder and choose a report from that folder this exception may occur. It is not recommended to run the drilldown reports directly as input to drilldown reports will come from main report.

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.