Jump to content

Thread safety issue.

Recommended Posts

By: Dmitriy Brovarnik - dbrovarnik

Thread safety issue.

2003-10-21 07:46


I have bumped into a problem with Jasper Reports when I had tried to use it in multithreaded environment.

My prototype does the following:

1. Loads XML design

2. Compiles it.

3. Fills the report

4. Exports it to PDF.


When I run this in a single thread it works fine.

As soon as I do it in multithreaded environment I am getting the exception below:

Note: If I set a certain delay between the two concurrent threads it works sometimes. Each tread is using a separate output file for filling.




Caused by: java.lang.NullPointerException

at dori.jasper.engine.fill.JRVerticalFiller.addPage(JRVerticalFiller.java:987)

at dori.jasper.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1042)

at dori.jasper.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1064)

at dori.jasper.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)

at dori.jasper.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:295)

at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:186)

at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:524)

at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:159)

at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:350)

at dori.jasper.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:271)




I?d appreciate any help.



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