PDA

View Full Version : Jasper Reports " report Filling Thread Interruption &qu


bhaarathm
Sep 30th, 2004, 12:33 AM
Hi,
I have a problem relate to jasper report, i have tried some solutions but i 'm still not solve this problem.
It's a web application, i used Jboss 3.2.3, tomcat 5.0 integrate in jboss. In EJBs, first i call to DAO layer to get datasource, parameters.
then i call to jasper report function: JasperFillManager.fillReportToStream(jasperreport, outputstream, parameters, datasource),
If the data source is small, the method call is ok. But with huge datasource, i am seeing this problem of Thread Interruption.
"The report filling thread was interrupted"!!!
---------------------------------------------------------------------------------------
I just do not understand why the Thread was interrupted and by whom…” is it by the container “ . To give you more context, the jasper code was invoked within a stateless session bean and that bean has transaction timout set to 600. Does the Container managed transaction timeout has anything to do with this Thread Interruption ? . My initial guess is not...maybe i might be wrong.
-----------------------------------------------------------------------------------------
I open source code code of jasper report, i I that the thread generate report was interrupted at statement:
"if (Thread.currentThread().isInterrupted())
{
throw new JRException("Current thread interrupted.");
}
"
Have you had experience with this problem? Could you share with me? Why we have to check the thread by statements: "Thread.currentThread().isInterrupted()"?

Pls see the printstackstrace for details.

19:58:20,311 ERROR [STDERR] dori.jasper.engine.JRException: The report filling t
hread was interrupted.
19:58:20,311 ERROR [STDERR] at dori.jasper.engine.fill.JRFiller.fillReport(J
RFiller.java:163)
19:58:20,311 ERROR [STDERR] at dori.jasper.engine.JasperFillManager.fillRepo
rt(JasperFillManager.java:350)
19:58:20,311 ERROR [STDERR] at dori.jasper.engine.JasperFillManager.fillRepo
rtToFile(JasperFillManager.java:271)
19:58:20,311 ERROR [STDERR] at dori.jasper.engine.JasperFillManager.fillRepo
rtToFile(JasperFillManager.java:257)
19:58:20,311 ERROR [STDERR] at com.dlv.inmpp.system.ReportManager.generateRe
port(ReportManager.java:56)
19:58:20,311 ERROR [STDERR] at com.dlv.inmpp.online.ejb.rpt.RAEJB.ra002a(RAE
JB.java:3453)
19:58:20,311 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
Native Method)
19:58:20,311 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N
ativeMethodAccessorImpl.java:39)
19:58:20,311 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
19:58:20,311 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:3
24)
19:58:20,311 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$Conta
inerInterceptor.invoke(Stateles...

Colin Sampaleanu
Oct 3rd, 2004, 09:59 AM
Is this timeout value (600) you mention actually being exceeded?

It's possible I guess the container is interrupting the thread after the timeout is exceeded...

bhaarathm
Oct 3rd, 2004, 02:02 PM
Actually, i was able to fix the problem. In JBoss 3.2.x , by default the containers goes and interrupts all the threads....so the report filling thread got interrupted whenever the transaction timedout.

thanks all for the replies