Jump to content
We've recently updated our Privacy Statement, available here ×

Jasper String Display Issue


stevelackey

Recommended Posts

I have a report that has been working fine for a couple of months.  But a recent data load caused it to break.  I get a Java stack trace, part of which is this...

 

Exception in thread "main" net.sf.jasperreports.engine.JRRuntimeException: java.lang.StackOverflowError
    at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:710)
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:329)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:419)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:378)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2018)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:757)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:289)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:131)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:938)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841)
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)

 

I've isolated the issue down the one line in my jrxml that is causing the problem:

<textFieldExpression class="java.lang.String"><![CDATA[$F{FTTH_CO_NME}]]></textFieldExpression>

In looking at some of the new data that was recently loaded, I see strings with Scandinavian charcters (e.g., a "y" with two dots above it) that I suspect are causing the problem.

 

Does anybody have any suggestions on how to deal with this?  Thanks.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

I've attached a copy of the report (actually a subreport).

No that's not the entire stack trace.  I'll include a little more here:

Exception in thread "main" net.sf.jasperreports.engine.JRRuntimeException: java.lang.StackOverflowError
    at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:710)
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:329)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:419)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:378)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2018)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:757)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:289)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:131)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:938)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841)
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
    at com.lfg.jasper.JasperTest.main(JasperTest.java:74)
Caused by: java.lang.StackOverflowError
    at java.util.HashMap$EntryIterator.<init>(HashMap.java:832)
    at java.util.HashMap$EntryIterator.<init>(HashMap.java:832)
    at java.util.HashMap.newEntryIterator(HashMap.java:846)
    at java.util.HashMap$EntrySet.iterator(HashMap.java:950)
    at java.util.AbstractMap.hashCode(AbstractMap.java:459)
    at java.util.HashMap$Entry.hashCode(HashMap.java:720)
    at java.util.AbstractMap.hashCode(AbstractMap.java:461)
    at java.util.HashMap$Entry.hashCode(HashMap.java:720)
    at java.util.AbstractMap.hashCode(AbstractMap.java:461)
    at java.util.HashMap$Entry.hashCode(HashMap.java:720)

Below this are just more calls to AbstractMap and Hashmap.

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I had noticed that, whenever a subreport isn't able to fit in the same page of the main report, it does throw this exception. But sometimes i donot see this happening.

I'am not exactly sure why, this happens. We are using two production servers, and this happens randomly on one of them. So I think my server resources are good, will investigate further.

 

Thanks

Ram

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