Report works in JasperReports Studio but not in JasperReports Server

0

Error in the stacktrace:

Arguments: 
    at com.jaspersoft.jasperserver.api.security.validators.Validator.validateSQL(Validator.java:500)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:168)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1245)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:723)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:440)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:554)
    at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:945)
    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:896)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1812)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runWithDataSource(EngineServiceImpl.java:1143)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:1072)
    at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:967)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

laggybuggy's picture
Joined: May 3 2018 - 5:40am
Last seen: 1 year 3 months ago

3 Answers:

1

I found the solution to my problem. It was caused by my update in the security-config.properties file in $TOMCAT/webapps/jasperserver/WEB-INF/classes/esapi/. I updated security.validation.sql.on to true. It was defaulted to false.

security.validation.sql.on=FALSE

After setting it back, my query successfully run in JasperReports Server.

laggybuggy's picture
Joined: May 3 2018 - 5:40am
Last seen: 1 year 3 months ago
0

There should be a "caused by" clause little bit further down in the log that usually offer clue to the cause of the problem.

hozawa's picture
59069
Joined: Apr 24 2010 - 4:31pm
Last seen: 9 months 3 weeks ago
0

@hozawa, there's really no succeeding logs. That's the end of the logs. Before it is the sql command but it is prefixed by the following text:

2018-09-22 10:06:52,622 ERROR Validator,pool-4-thread-12:499 - Invalid SQL:An error has occurred. Please contact your system administrator. (6632),

This is what confused me because it is running as expected in JasperReports Studio 6.6.0. I'm able to successfully generate reports there.

laggybuggy's picture
Joined: May 3 2018 - 5:40am
Last seen: 1 year 3 months ago
Feedback
randomness