How to fix Jasperserver error 6632

H

When I want to run a certain report on Jasperserver. I got an error like: An error has occurred. Please contact your system administrator. (6632)

When I looked into the logs or the jasper messages. I saw an error like:

com.jaspersoft.jasperserver.api.JSSecurityException: An error has occurred.
Please contact your system administrator. (6632)
at com.jaspersoft.jasperserver.api.security.validators.ValidatorImpl.validateSQL(ValidatorImpl.java:394)

You probably have an error in your SQL query. I had a query where I did a union all surrounded by parentheses. For example, it’s the same as you do:

(select * from table)

Jasperserver sees that as invalid, so I recreated my query without the parentheses and that works fine!

Now if this error keeps throwing, you could set the SQL validation off. You can do this by opening the following file on your jasperserver: webapps/jasperserver/WEB-INF/classes/esapi/security-config.properties

Now, when this file is opened with a text editor, search for ‘security.validation.sql.on‘. If you found that, you need to set its value to false:

security.validation.sql.on=false

After you changed that and uploaded it back, restart your jasperserver instance and enjoy running your report! Not that disabling the security could lead to SQL injection.

Add comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Tag Cloud

Categories