Jump to content

JasperFillManager.fillReport extremely slow


vishalmestri

Recommended Posts

  Dear All,

 
I am using jboss-5.1.0.GA for development and same is there on production server.
 
Further I have created schedular in which I am calling JasperFillManager.fillReport.
 
Code for schedular is running fine if I remove jasper code. (schedular code is shown below in code section).
 
When I start jboss and deploy my applicatoin, code runs till point "JasperPrint jasperPrint = JasperFillManager.fillReport(getJasperReport(), parameterMap, con);".
 
Post this, it just hangs.I have even added old SOP debuging. i.e. added system.out.println above and below of this statement but it just prints SOP above and then does not do anything.
 
Post that I have enable verbose options in jboss while starting jboss, but i did not get any clue on that as well.
 
Please find attached log(jbossverbose.log) generated due to enablement of verbose option.
 
Main issue is when I run same code as java application , I am successfully able to generate pdf.
 
I am suspecting is it due to that jasper is running in jboss thread for schedular...?
 
I am using windows XP sp2 and jdb 1.5.
 
jasper 4.5
 
 
 
Please let me know if any more information is required.
 
I can not share entire code..
 
Thanks and regards,
 
Vishal
 
 
 
Code:
Jboss schedular code:-...public class EmailScheduler implements org.jboss.varia.scheduler.Schedulable {public void perform(Date pTimeOfCall, long pRemainingRepetitions) {...generate()...}public void generate(){..try{				JasperReport jasperReport = (JasperReport) JRLoader.loadObject("d:/a.jasper");/*I have created necessary connection and parameter map and passedcode for that i am not adding */JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport , parameterMap, con);FileOutputStream outfile=new FileOutputStream(outputfile);JasperExportManager.exportReportToPdfStream(jasperPrint, outfile);outfile.close();}catch(JRException jre){jre.printStackTrace(System.out);}..}
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...