开发者

error exporting data to excel with display tag 1.1.1

We’ve a problem开发者_StackOverflow社区 with our J2EE application, which uses Display Tag library 1.1.1. The problem is that we’ve a "Java heap space" error when we try to export the result of a SQL query to a excel using the following code:

<c:url value="/admin/inscripcion/listarBuscarInformeSeg.do" var="listarBuscarInformeSegAction"></c:url>
<display:table name="informeSeg" id="seg" pagesize="20" requestURI="${listarBuscarInformeSegAction}" 
    class="listadoInforme" cellpadding="2" cellspacing="0" 
    style="margin-left: auto;margin-right: auto;" export="true">

The SQL query returns 32000 records. The memory configuration of our server (Jboss) is 256 MB max. We can’t increase the memory of the server because the client doesn’t let us to do that.

Do you know if this error is a bug of the display tag library? Can you tell us anything more about this error? How can we solve this error?


Setting 32000 recods in memory will definitely thow out of memory error that too with only 256 MB RAM. Try not to export all 32000 records, instead paginate your list and only export page wise. Alternatively you can use itext for exporting purpose instead of displaytag inbuild export option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜