1
votes

Issue:

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

Details

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.

1
Try doing select RAWTOHEX(sys_guid()) as ID from dual - dada67
Thank you @dada67 RAWTOHEX() worked. - Amit Walvekar
Posted as answer for visibility. - dada67
@AmitWalvekar consider to accept the answer posted by dada67 (the green check next to answer), since this worked for you and marks that you had a solution see tour to learn more. - Petter Friberg

1 Answers

2
votes

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