BruceBerry Posted September 18, 2006 Share Posted September 18, 2006 I'm writing a webapp for tomcat that uses a servlet to display a report, using jasperreports-1.2.6. The report is compiled at compile-time through an ant-task, then it is loaded at runtime with:Code:JasperReport jasperReport = (JasperReport)JRLoader.loadObject(jasperReportFile);but this instruction thwows an exception (here is e.toString() output):Code:[code]net.sf.jasperreports.engine.JRException: Class not found when loading object from file : /home/riccardo/Progetto/tomcat/webapps/jasperPortlet/WEB-INF/report/WebAppReport.jasperand of course the file exits and it's the result of a successful compilation of a jrxml file...What's happening here? I made an hello world report with ireport and it doesn't work anyway. Link to comment Share on other sites More sharing options...
venkat1201 Posted September 18, 2006 Share Posted September 18, 2006 its all just because u'r not storing the .Jasper file which is the file generated at compile time. into the folder which u'r expecting to get that file. so just check it where its storing, that .Jasper file. u can specify it in the servlet where u need to save the .Jasper . Link to comment Share on other sites More sharing options...
venkat1201 Posted September 18, 2006 Share Posted September 18, 2006 its all just because u'r not storing the .Jasper file which is the file generated at compile time. into the folder which u'r expecting to get that file. so just check it where its storing, that .Jasper file. u can specify it in the servlet where u need to save the .Jasper . Link to comment Share on other sites More sharing options...
BruceBerry Posted September 18, 2006 Author Share Posted September 18, 2006 the file exists! I wrote the wrong path a while ago and it gave me a slighltly different error, now the path is 100% correct. The file is here even after "maven clean && maven war" so it IS the file generated by the ant task. Link to comment Share on other sites More sharing options...
lucianc Posted September 19, 2006 Share Posted September 19, 2006 Could you post the full exception stacktrace (including nested) so that we can see what class is missing? Regards,Lucian Link to comment Share on other sites More sharing options...
elefter Posted May 6, 2010 Share Posted May 6, 2010 Code:adding this piece of code will show you what the missing class is catch(JRException ex){ System.out.println("class Message: " + ex.getCause()); } 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