Jump to content

Problem loading compiled report


BruceBerry

Recommended Posts

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.jasper

and 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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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

  • 3 years later...

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...