Jump to content
Changes to the Jaspersoft community edition download ×

Error with JR, and can't replicate


felipinVzla

Recommended Posts

Well i can't replicate this error only is generated from a tomcat proyect that return a csv, html or excel file to the request user. And occurs few times.

 

The issue is, i want to know if is possible, the common cause for this Exception.

 

Thanks a lot......

 

I hope that you understand :)

 

java.lang.ClassCastException: java.lang.Integer

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveBoundElements(JRBaseFiller.java:1029)

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveBoundElements(JRBaseFiller.java:1050)

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveReportBoundElements(JRBaseFiller.java:1067)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:821)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:259)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:135)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:758)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

I don't think anyone can come up with a common cause for this exception, since it's the first time I see it.

 

I'm not able to imagine a scenario that would lead to this exception by looking at the code. If you manage to find a way to replicate it, or you have any further details that might help us to identify the cause, let us know.

 

Regards,

Lucian

Link to comment
Share on other sites

  • 1 year later...

we are using JasperReports 1.3.0 in our application and are seeing the exact same error intermittently. The weird part is this error is not reproducable, the same report works fine one time and fails the other time......was there any solution identified for this issue? we tried to run the exact same report 600 times and it executed fine 594 times and thrown the error 6 times.

 

java.lang.ClassCastException: java.lang.Integer

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveBoundElements(JRBaseFiller.java:1088)

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveBoundElements(JRBaseFiller.java:1109)

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveReportBoundElements(JRBaseFiller.java:1126)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:805)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:240)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:116)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:751)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:660)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)

at com.sam.reports.job.ReportGenerator.executeProcess(ReportGenerator.java:410)

 

Please let us know if there is a solution for this issue

Link to comment
Share on other sites

Hi, I have attached the java code and the jrxml template producing the problem. We are encountering the java.lang.Integer only during heavy loads where the same report is ran 1000's of times. This error is not reproducible all the time, let me know if you find the root cause for the problem.

 

Jagadeesh [file name=JasperDriver.zip size=15759]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/JasperDriver.zip[/file]

Link to comment
Share on other sites

Well, I don't how exactly I should try to replicate the issue since you posted some JRXMLs and some Java files, but we don't have your data so we won't be actually able to run the reports. The idea was to have a self-contained sample to reproduce the problem. It doesn't necessarily have to be the actual report that you have observed this, but another (preferably simplified/minimal) test case that displays the same behaviour.

 

Until we don't have a full sample to reproduce this, I'm afraid all our efforts to understand how this happens would be in vain.

 

Btw, another issue is that it's not clear what exactly would one need to run in order to reproduce the problem since there are 2 Java classes that execute some reports, and 2 independent JRXMLs.

 

Regards,

Lucian

Link to comment
Share on other sites

Hi,

We are having 20 threads to process reports concurrently and in our testing one single report is being invoked by all 20 threads with the same parameter map. We are believing that the error is happening to synchronization issue with scriptlet class. We have defined a custom scriptlet with some methods like numberFormatter, dateFormatter in order to format the data. Can you let us know how scriptlet class is shared across these multiple instance, could this be causing the issue. We are running another test now by remove the script let class from the summary band to see if that resolves the issue, I will let you know the results. I am posting this message to understand the way scriptlet class used when the same report is being run by all threads.....

 

Thanks in advance,

Jagadeesh

Link to comment
Share on other sites

Each time a report is executed, an instance of the scriptlet class is created and used while filling the report. So unless you are manually passing a scriptlet object, scriptlet instances will not be shared by multiple report executions (but, of course, static scriptlet class members will be shared).

 

Looking at the exception, scriptlets do not seem like plausible causes.

 

Regards,

Lucian

Link to comment
Share on other sites

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