aspose file tools
The moose likes Struts and the fly likes BeanUtils.populate  error while refreshing the page from search results. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "BeanUtils.populate  error while refreshing the page from search results." Watch "BeanUtils.populate  error while refreshing the page from search results." New topic
Author

BeanUtils.populate error while refreshing the page from search results.

Praveen Thaliyil
Greenhorn

Joined: May 17, 2012
Posts: 10

javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:497)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
com.scalar.UTF8Filter.doFilter(UTF8Filter.java:20)
com.scalar.doctrac.filters.SSAuditTrialFilter.doFilter(SSAuditTrialFilter.java:80)


root cause

java.lang.IndexOutOfBoundsException: Index: 64, Size: 8
java.util.ArrayList.RangeCheck(Unknown Source)
java.util.ArrayList.get(Unknown Source)
org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:433)
org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:340)
org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:684)
org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:884)
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
com.scalar.UTF8Filter.doFilter(UTF8Filter.java:20)
com.scalar.doctrac.filters.SSAuditTrialFilter.doFilter(SSAuditTrialFilter.java:80)




hi all it's my problem with the struts application. I just get this error when i refreshing the page after search results. The action forwards the results to the same JSP page. So its the problem with arraylist indexing on that page. can you help ???

Thanks in advance.BeanUtils.populate error while refreshing the page from search results.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4202
    
    3

Moved from Blatant Advertising.


luck, db
There are no new questions, but there may be new answers.
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Hi Praveen,
Post the code from the search screen where you are iterating the search result


Have Fun with Java
little,little.. little by little makes a lot..
Praveen Thaliyil
Greenhorn

Joined: May 17, 2012
Posts: 10

Hi shankar, thanks for the reply...

Actually I am using customized tag belong to my project-name to display my search results. The tag points to a class "DocumentResultsTag.java" which prints the document list by iterating like below,

for (int j = startIndex; j <= endIndex; j++)
{
localDocument = (Document) documentList.get(j);

out.println("<input type = 'hidden' name='documentList[" + j + "].documentId' value='" + localDocument.getDocumentId() + "' > ");") .
out.println("<input type = 'hidden' name='documentList[" + j + "].activity' value='" + localDocument.getActivity() + "' > ");
}

Thus the page source looks likes the below.

<tr>
<input type = 'hidden' name='documentList[0].documentId' value='1181' >
<input type = 'hidden' name='documentList[0].activity' value='' >

<input type = 'hidden' name='documentList[1].documentId' value='1182' >
<input type = 'hidden' name='documentList[1].activity' value='' >

</tr>

I found the indexing cause the problem, when i refreshing the results page. But the hidden fields are important to me for further functionality.

How can I manage this ??

Thanks in advance.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: BeanUtils.populate error while refreshing the page from search results.
 
Similar Threads
java.lang.Illegal Argument Exception: argument type mismatch
IndexOutOfBounds in BeanUtils.Populate()
Error msg: No bean specified
problem in html:image
file uploading error