kapil.gureja Posted June 28, 2016 Share Posted June 28, 2016 We are facing an issue where different sections (the jasper lists designed on the Jasper page) are appearing misordered in the exported PDF, when rendered from JAVA with multiple threads access the same compiled .jasper version with its own separate DB connection. It seems there happening some locking of the jasper objects when accessed by multiple threads simultaneouly. So instead of accessing the same .jasper file, we've made separate JaspeReport objects for each thread so that there doesn't happen any locking and data come back in the correct order. But this change also has not helped out us to resolve the issue. We are not sure how Jasper APIs are designed to work with multiple threads at the same time. Any inputs would be helpful? Link to comment Share on other sites More sharing options...
hozawa Posted June 29, 2016 Share Posted June 29, 2016 I'm not getting you. You're suppose to share JasperReport object because it is the same for all instances. Just create new instances of JasperPrint objects for each datasource. Link to comment Share on other sites More sharing options...
kapil.gureja Posted June 29, 2016 Author Share Posted June 29, 2016 We already have separate JasperPrint objects for each thread. Also tried with both - first with same shared JasperReport object and then with separate one JasperReport object per thread. Both ways we are seeing this issue. The issue is not about of getting records/pages from 2 different thread execution messed up with each other. It is happening with in a single JasperPrint page, the data records are now not in the accurate order. As an example, if there are 3 lists designed sequentially on the page - list A, list B, list C. Now for a single case, data should come up in the order - records of List A , followed by records of list B, followed by records of List C, but it is appearing in the order in one of the case - some records of List B, some records of List A, (again) remaining records of List B, so on.. Link to comment Share on other sites More sharing options...
hozawa Posted June 29, 2016 Share Posted June 29, 2016 Suggest you create a new case at Tracker with an example jrxml and detailed steps to reproduce the error. Sorry, but I don't have any problem and I haven't had any problem with multi-threading nor have seen any with JasperReports Server. http://community.jaspersoft.com/bug-tracker Link to comment Share on other sites More sharing options...
kapil.gureja Posted July 4, 2016 Author Share Posted July 4, 2016 http://community.jaspersoft.com/jasperreports-library/issues/8076 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