[
http://jira.codehaus.org/browse/DISPL-366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_125976
]
Matthew Kemp commented on DISPL-366:
------------------------------------
I am also experiencing a similar issue running in JBoss (4.x) + Tomcat (5.x).
I noticed that this only happens occasionally - maybe once a week. For me at
least, it only appears to happen when the list I pass display tag is empty.
Most of the time display tag works fine and displays the no objects found
message.
Just for good measure, here's the stack trace:
Caused by: java.lang.IndexOutOfBoundsException: fromIndex = -1
at java.util.SubList.<init>(AbstractList.java:703)
at java.util.RandomAccessSubList.<init>(AbstractList.java:861)
at java.util.AbstractList.subList(AbstractList.java:570)
at
org.displaytag.pagination.SmartListHelper.getListForPage(SmartListHelper.java:219)
at
org.displaytag.pagination.SmartListHelper.getListForCurrentPage(SmartListHelper.java:200)
at org.displaytag.tags.TableTag.setupViewableData(TableTag.java:1525)
at org.displaytag.tags.TableTag.doEndTag(TableTag.java:1198)
... [more jsp stuff] ...
> I am recieving a "java.lang.IndexOutOfBoundsException: fromIndex = -10" error
> while trying to use the sort/pagination functionality of display tag 1.1.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DISPL-366
> URL: http://jira.codehaus.org/browse/DISPL-366
> Project: DisplayTag
> Issue Type: Bug
> Components: Paging/Sorting
> Affects Versions: 1.1
> Reporter: ksandhu
>
> I have two jsp pages : the first is titled customer_search.jsp and the second
> is customer_details.jsp.
> From customer_search.jsp, the user enters their customer search criteria.
> java.util.List searchResults;
> searchResults = customer.getCustomers();
> //set session and forward page
> session.setAttribute("searchResults",searchResults);
> <jsp:forward page="customer_details.jsp" />
> I pass in the sessionVariable "searchResults" which is an ArrayList into my
> customer_details.jsp page.
> java.util.List customerList =
> (java.util.List)session.getAttribute("searchResults");
> %>
> <jsp:scriptlet> request.setAttribute( "test", customerList); </jsp:scriptlet>
> <%
> %>
> <pre>
>
> <display:table name="sessionScope.searchResults" class="its" pagesize="10">
> <display:column property= "account_no" title="Account No" />
> <display:column property= "customer_name" title="Customer Name"/>
> <display:column property= "contact_name" title="Contact Name"/>
> <display:column property= "contact_phone" title="Phone Number"/>
> <display:column property="link2" title=" " />
> </display:table>
> The search results appear fine but when I click on the page links at the top,
> I get an Index out of bounds exception. Heres the root cause from tomcat:
> java.lang.IndexOutOfBoundsException: fromIndex = -10
> java.util.SubList.<init>(AbstractList.java:703)
> java.util.RandomAccessSubList.<init>(AbstractList.java:861)
> java.util.AbstractList.subList(AbstractList.java:570)
>
> org.displaytag.pagination.SmartListHelper.getListForPage(SmartListHelper.java:219)
>
> org.displaytag.pagination.SmartListHelper.getListForCurrentPage(SmartListHelper.java:200)
> org.displaytag.tags.TableTag.setupViewableData(TableTag.java:1525)
> org.displaytag.tags.TableTag.doEndTag(TableTag.java:1198)
>
> org.apache.jsp.admin.customer_005fdetails_jsp._jspx_meth_display_table_0(customer_005fdetails_jsp.java:368)
>
> org.apache.jsp.admin.customer_005fdetails_jsp._jspService(customer_005fdetails_jsp.java:203)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel