2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: flying - ibmj2ee JaperPrint:ClassCastException like this: 2004-08-12 23:42 user like this: JasperPrint jp = (JasperPrint)JRLoader.loadObject(fileName); throw ClassCastException. but use like this: JasperReport jr = (JasperReport)JRLoader.loadObject(fileName); it work well; filename="test.jasper"; can you give me an explain?or it's bug? thanks By: Richard Barnett - richard_barnett RE: JaperPrint:ClassCastException like this: 2004-08-13 08:18 JRLoader.loadObject is reading the contents of test.jasper & instantiating a Java object from it. The object is an instance of JasperReport but not an instance of JasperPrint -- hence the ClassCastException. I haven't used JasperPrint objects or their serialised form, but they look like they contain the actual data to be printed in a page-centric XML description -- presumably an intermediate form before PDF generation. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now