Jump to content
Changes to the Jaspersoft community edition download ×

JRLoader.loadObject java.lang.ClassCastExcept

2004 IR Help

Recommended Posts

By: seanm - mcelroyjj

JRLoader.loadObject java.lang.ClassCastExcept

2005-11-16 05:42



I create a compliled report using iReport and tried to load the report using JRLoader.loadObject. The loadObject method throws a ClassCastException. You can see my code below. Can anyone explain why this is happening. The sample JasperReports code uses this functionality. My only guess is that there is a conflict between iReport and JasperReport


Thanks in advance.



File sourceFile = new File("C:\Development\reportstest\options.jasper");


JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);





By: Gareth Davies - telcontar4

RE: JRLoader.loadObject java.lang.ClassCastExcept

2005-12-09 08:38

Use a JasperReport type instead of JasperPrint and you should be good to go.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...