JasperReports Server不执行iReport执行的查询

时间:2013-07-12 16:58:45

标签: jasper-reports jasperserver

我使用 JasperReports 4.7 iReport 4.7.1 PostgreSQL 8.4 作为数据库后端。

使用类似于

的查询执行报告时
(select * from table1)
union
(select * from table1)

我发现 iReport 报告但是当我将报告上传到 JasperReport服务器时,我得到了An error has occurred. Please contact your system administrator. (6632)

我将查询重写为

select *
from (
(select * from table1)
union
(select * from table1)
) t

它适用于 iReport JasperReports

所以,问题是,我错过了什么或者我需要配置什么?

1 个答案:

答案 0 :(得分:1)

我认为这是因为“新”(自4.5版以来)的安全功能。 SQL查询应该在服务器上执行时以select开头。 (您的查询以“(”)开头 尝试禁用安全检查,FOR TESTING:

security.validation.sql.on=false

在:

webapps/jasperserver/WEB-INF/classes/esapi/security-config.properties