When creating input control with single select query, if we include any RAW ID (like GUID) in the value or visible field the server throws a runtime exception:
2018-09-11 14:25:50,813 ERROR GenericExceptionMapper,http-nio-8080-exec-1:51 - Unexpected error occurs
java.lang.IllegalStateException: Processor of type com.jaspersoft.jasperserver.war.cascade.handlers.converters.DataConverter for class [B not configured
Jasperreports Server Version: 6.6.0
How to reproduce: Upload any sample report and edit this report. Add an input control to this report by choosing Single-select Query option. Fill in mandatory field and on the Define the Query Page add following query
select sys_guid() as ID from dual
Then on the Set Parameter Values Page enter ID as Value Column and ID as Visible Columns. Submit and save the input control and report. When you execute this report Jasperreports Server throws above error.
Any help would be greatly appreciated.
The error is caused by the fact that RAW values map to byte[] via JDBC, and JasperReports Server input control code cannot handle byte arrays.
The solution is to change the query to convert the RAW value to a VARCHAR/String value via RAWTOHEX
select RAWTOHEX(sys_guid()) as ID from dual