java.lang.ClassNotFoundException: byte cannot be found by bet.sf.jasperreports_6.3.0.final error during Jasper Report Preview

book

Article ID: 7820

calendar_today

Updated On:

Products

SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service KNOWLEDGE TOOLS CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

When attempting to run a new report in Jasper Studio, the preview fails with the following error:

java.lang.ClassNotFoundException: byte cannot be found by bet.sf.jasperreports_6.3.0.final

Cause

After selecting or adding the fields to the reports, one of the fields type of data was incorrectly selected instead of java.lang. DATA_TYPE, it was added byte[], this type of data does not allow the report to ran since it is a not valid.

Environment

Jasper Studio 6.3.0 or above

Resolution

1. Open Jasper Studio and select the report with the issue.

2. in the fields folder on the bottom left, make a right click on the field and select Properties, this will birng the properties window on the right.

3. Verify the "Class" field if it has byte[] change it to java.lang.String.

4. Save the changes and test the report preview.