2006 IR Open Dicussion Posted August 27, 2006 Share Posted August 27, 2006 By: dfailla - d_failla ClassNotFoundException when loading object 2006-05-05 07:44 I am using the code below to load a compiled jasper file in the JDeveloper environment. It will run properly the first time, but when trying to load again to service a second request, a ClassNotFoundException will be thrown from the loadObject() method. The source of the problem seems to be in the deserialization of contained classes in the report such as JRBaseLine, JRBaseRectangle. Any ideas why the exception? It sees all classes the first time through. File reportFile = new File("C:\WS_examples\dodimrcat1.jasper"); JasperReport jasperReport = null; try { jasperReport = (JasperReport) JRLoader.loadObject (reportFile.getPath()); System.out.println("Got compiled report"); } catch(JRException jrExp){ jrExp.printStackTrace(); } return(jasperReport); By: develito - devel2k5 RE: ClassNotFoundException when loading objec 2006-05-05 20:01 Hi.. How do you display the report..??? Are you using a JRViewer?? Because I had a similar problem with a Web Application made in jDeveloper.. When the report was called by the first time the report was OK.. but the second time the report don´t work.. And this was happening because the report was visualized in a JasperViewer.. like this : (new JasperViewer()).viewReport( Myjasperprint); Then, in view of the mistake.. I change the viewer calling for this: (new JasperViewer()).viewReport( Myjasperprint, false); Look the 'false' parameters.. this parameter is for when the windows report in closed it simply hide and not exit.. I hope this help you.. ___________________________ PD: Sorry for may English.. 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