Issue:I was given this to add to reprots because of writing temp files net.sf.jasperreports.file.buffer.os.memory.threshold=-1 We added it and still temp files were written - see below Plus we got these errors - why | [toc] |
Fill 1714476720: exception Errors were encountered when compiling report expressions class file: 2012-04-30 20:24:44,477 WARN FileBufferedOutputStream,Finalizer:237 - Error while deleting the temporary file 2012-04-30 20:26:02,619 ERROR JRThreadSubreportRunner,http-intgjasper-1.arc.com% 2F10.164.104.156-6060-4:108 - Fill 1714476720: exception java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.waitResult(JRThreadSubreportRunner.java:100) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.resume(JRThreadSubreportRunner.java:87) at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:623) at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:327) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:402) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:361) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryOverflow(JRVerticalFiller.java:1736) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterNewPage(JRVerticalFiller.java:1196) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1029) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:156) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:923) at com.jaspersoft.ji.engine.ProEngineServiceImpl.fillReport(ProEngineServiceImpl.java:251) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:727) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:385) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReport(EngineServiceImpl.java:872) at com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:57) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:319) at com.jaspersoft.ji.engine.ProEngineServiceImpl.execute(ProEngineServiceImpl.java:132) at com.jaspersoft.jasperserver.war.action.ViewReportAction.executeReport(ViewReportAction.java:461) at com.jaspersoft.ji.report.options.actions.ReportOptionsViewAction.executeReport(ReportOptionsViewAction.java:96) at com.jaspersoft.jasperserver.war.action.ViewReportAction.executeReport(ViewReportAction.java:451) at com.jaspersoft.jasperserver.war.action.ViewReportAction.runReport(ViewReportAction.java:284) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:98) at org.springframework.webflow.action.MultiAction.doExecute(MultiAction. at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:79) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145) at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) at java.lang.Object.wait
Resolution:
net.sf.jasperreports.file.buffer.os.memory.threshold is superseded by a hidden Spring configuration property, so you'll need to change both to make it effective.
Also, -1 doesn't work so you should use a big value like 2147483647.
To change the Spring configuration property, you need to edit WEB-INF/applicationContext-report-scheduling.xml, find a bean of type com.jaspersoft.jasperserver.api.metadata.common.domain.FileBufferedDataContainerFactory and add a memoryThreshold property to it:
<entry key="dataContainerFactory">
<bean class="com.jaspersoft.jasperserver.api.metadata.common.domain.FileBufferedDataContainerFactory">
<property name="memoryThreshold" value="2147483647"/>
</bean>
</entry>
Ref. Case #00026056
16:04, 26 June 2012 (UTC)
Recommended Comments
There are no comments to display.