[ 
https://issues.apache.org/struts/browse/STR-3003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40062
 ] 

Niall Pemberton commented on STR-3003:
--------------------------------------

This sounds like BEANUTILS-97 and that sun have ported back the changes that 
appeared in JDK 1.4 to JDK 1.3.1_19.

Basically the older versions didn't care what the return type/parameter was for 
the get/set methods. Later versions decided that if the return type/parameter 
wasn't an array then it wasn't the getter for the indexed property and 
basically "hides" those methods - just providing visibility to the indexed 
methods (i.e. the ones that include the index value). Read tje BeanUtils Jira 
ticket for full details.

   https://issues.apache.org/jira/browse/BEANUTILS-97

BeanUtils has a fix to retain the old behaviour (i.e. treat java.util.List as 
an indexed property as well as arrays) - but there hasn't been a release of 
BeanUtils since the patch was applied. At the moment the Commons nightly builds 
are not working - when they are you can try downloading a nightly and see if it 
fixes your problem:

  http://people.apache.org/builds/jakarta-commons/nightly/commons-beanutils/

Otherwise you could check out the source and build it yourself:

  http://jakarta.apache.org/commons/beanutils/cvs-usage.html

I'll leave this open for the moment - but I don't think its a Struts problem. 
Its not really a BeanUtils problem either - since its Sun that changed the 
behaviour!

> Having Normal getter and setter methods and Indexed getter method for a same 
> property 
> --------------------------------------------------------------------------------------
>
>                 Key: STR-3003
>                 URL: https://issues.apache.org/struts/browse/STR-3003
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Website
>    Affects Versions: 1.0 Final
>         Environment: OS - Windows XP
>            Reporter: Sasidharan Vijayakumar
>         Assigned To: Erik Beeson
>            Priority: Blocker
>
> Application : WEb application
> Struts version : 1.0
> JRE : 1.3.1_03
>       
>          Currently we are moving our apllication to JRE 1.3.1_19 from 
> existing JRE 1.3.1_03.  The code part we are facing problem is  as below
>       public RepeatingRow getRows(int index)
>       {
>           return (RepeatingRow)rows.get(index);
>       }
>      public void setRows(ArrayList al)
>      {
>         if(al == null)
>             return;
>         if(al.size() == 0)
>             return;
>         rows = al;
>         numRows = al.size();
>      }
>      public void setRows(int index, RepeatingRow repeatingRow)
>      {
>             if(rows != null)
>              rows.set(index,repeatingRow);
>      }
> So for the property "rows" we are having normal getter/setter methods and on 
> indexed getter method. The stack trace of the error is given as
> java.lang.NoSuchMethodException: Property 'rows' has no getter method
>         at 
> org.apache.struts.util.PropertyUtils.getSimpleProperty(PropertyUtils.
> java:713)
>         at 
> org.apache.struts.util.PropertyUtils.getNestedProperty(PropertyUtils.
> java:426)
>         at 
> org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils.java:4
> 53)
>         at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:503)
>         at 
> org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:
> 302)
>         at 
> com.gcre.facworld.jsp._jsp._struts._guts._submission.__propertyguts._
> jspService(__propertyguts.java:5882)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
>         at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:120)
>         at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:138)
>         at 
> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat
> cherImpl.java:293)
>         at 
> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat
> cherImpl.java:196)
>         at 
> weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:117
> )
>         at 
> org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:189)
>         at 
> com.gcre.facworld.jsp._jsp._struts._template.__facworldformpagetempla
> te._jspService(__facworldformpagetemplate.java:817)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
>         at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:120)
>         at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:138)
>         at 
> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat
> cherImpl.java:293)
>         at 
> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat
> cherImpl.java:196)
>         at 
> weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:117
> )
>         at 
> org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:1
> 45)
>         at 
> com.gcre.facworld.jsp._jsp._struts._frame._submission.__property._jsp
> Service(__property.java:197)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
>         at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:120)
>         at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:138)
>         at 
> weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
> cherImpl.java:169)
>         at 
> org.apache.struts.action.ActionServlet.processActionForward(ActionSer
> vlet.java:1758)
>         at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:159
> 5)
>         at 
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>         at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:120)
>         at 
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
> textImpl.java:946)
>         at 
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
> textImpl.java:910)
>         at 
> weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
> ContextManager.java:277)
>         at 
> weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
> a:403)
>         at 
> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:285)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
> Kindly look into it and let me know the workaround or resolution for this. 
> Thanks in advance,
> Sasidharan. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to