So, having narrowed this down more since my last post, I've found that the BeanUtils.setProperty() method is doing a check to see if there is a nested property that needs to be set. Since we are using image buttons, the name of the form element becomes GoToStep2.y, which confuses the util and makes it try a mapped property approach. I noticed an archive posting from 7/2000 that Craig mentions that it could be a bug and a fix was going to be in the works (?):
http://www.servlets.com/archive/servlet/ReadMsg?msgId=18519&listName=str uts-dev Anyone know anything about this? Again, I'm on the 11/19 nightly, so I should be pretty up to date.. Any help would be appreciated, as I'm on a deadline of this week to upgrade Struts. Thanks, James > -----Original Message----- > From: James Higginbotham > Sent: Tuesday, November 19, 2002 4:43 PM > To: [EMAIL PROTECTED] > Subject: [BeanUtils] Reflection exceptions > > > Hi, > > [Sorry, this was posted to Struts this morning, but on > further investigation, it appears to be a (possibly known) > issue with the bean-utils + reflection. ] > > I am upgrading Struts from a Jan 2002 nightly binary to the > 11/13/02 nightly binary and I am seeing the following > exception during a form bean population. I saw that a bug was > in the commons-beanutils jar recently, so I upgraded that to > the 11/19/02 jar and still no help. Please let me know what > else I may need to provide. > > Here is the exception and relevant information: > > 2002-11-19 10:06:10,555 INFO > [org.apache.struts.action.RequestProcessor] Processing a > 'POST' for path '/tree/addTaxonomy' 2002-11-19 10:06:10,555 > DEBUG [org.apache.struts.util.RequestUtils] > Looking for ActionForm bean instance in scope 'session' under > attribute key 'addTaxonomyForm' 2002-11-19 10:06:10,555 DEBUG > [org.apache.struts.util.RequestUtils] > Recycling existing ActionForm instance of class > 'com.betweenmarkets.web.tree.form.AddTaxonomyRequestForm' > 2002-11-19 10:06:10,555 DEBUG > [org.apache.struts.util.RequestUtils] --> > Form- name:Untitled Classification taxonomyPackageName: > newClassification: description: returnPage: > 2002-11-19 10:06:10,555 DEBUG > [org.apache.struts.action.RequestProcessor] Storing > ActionForm bean instance in scope 'session' under attribute > key 'addTaxonomyForm' 2002-11-19 10:06:10,555 DEBUG > [org.apache.struts.action.RequestProcessor] Populating bean > properties from this request 2002-11-19 10:06:10,555 DEBUG > [org.apache.commons.beanutils.BeanUtils] > BeanUtils.populate(Form- name:Untitled Classification > taxonomyPackageName: newClassification: description: > returnPage: , {newClassification=[Ljava.lang.String;@c2354, > GoToStep2.y=[Ljava.lang.String;@6396f5, > GoToStep2.x=[Ljava.lang.String;@4bce4f, > returnPage=[Ljava.lang.String;@55d048, > taxonomyPackageName=[Ljava.lang.String;@5d5a2c}) > 2002-11-19 10:06:10,555 DEBUG [org.apache.commons.beanutils.BeanUtils] > setProperty(Form- name:Untitled Classification taxonomyPackageName: > newClassification: description: returnPage: , newClassification, > [new]) > 2002-11-19 10:06:10,555 DEBUG [org.apache.commons.beanutils.BeanUtils] > Skipping read-only property > 2002-11-19 10:06:10,555 DEBUG [org.apache.commons.beanutils.BeanUtils] > setProperty(Form- name:Untitled Classification taxonomyPackageName: > newClassification: description: returnPage: , GoToStep2.y, > [11]) 2002-11-19 10:06:10,585 WARN [org.jboss.jbossweb] > WARNING: Error for /transactionmanagerweb/tree/addTaxonomy.bmi > java.lang.IllegalAccessError: try to access class > org.apache.commons.beanutils.MappedPropertyDescriptor$1 from > class org.apache.commons.beanutils.MappedPropertyDescriptor > at > org.apache.commons.beanutils.MappedPropertyDescriptor.getPubli > cDeclaredM > ethods(MappedPropertyDescriptor.java:378) > at > org.apache.commons.beanutils.MappedPropertyDescriptor.internal > FindMethod > (MappedPropertyDescriptor.java:448) > at > org.apache.commons.beanutils.MappedPropertyDescriptor.findMeth > od(MappedP > ropertyDescriptor.java:522) > at > org.apache.commons.beanutils.MappedPropertyDescriptor.<init>(M > appedPrope > rtyDescriptor.java:149) > at > org.apache.commons.beanutils.PropertyUtils.getPropertyDescript > or(Propert > yUtils.java:889) > at > org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(P > ropertyUti > ls.java:1154) > at > org.apache.commons.beanutils.PropertyUtils.getNestedProperty(P > ropertyUti > ls.java:754) > at > org.apache.commons.beanutils.PropertyUtils.getProperty(Propert > yUtils.jav > a:783) > at > org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:793) > at > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) > at > org.apache.struts.util.RequestUtils.populate(RequestUtils.java:962) > at > org.apache.struts.action.RequestProcessor.processPopulate(Requ > estProcess > or.java:798) > at > org.apache.struts.action.RequestProcessor.process(RequestProce > ssor.java: > 254) > at > org.apache.struts.action.ActionServlet.process(ActionServlet.j > ava:1349) > at > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:507) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366) > at > org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter > (WebApplic > ationHandler.java:341) > at > com.betweenmarkets.web.accesscontrol.AccessControlServletFilte > r.doFilter > (AccessControlServletFilter.java:128) > at > org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter > (WebApplic > ationHandler.java:333) > at > org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebAp > plicationH > andler.java:285) > at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler > .java:581) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1687) > at > org.mortbay.jetty.servlet.WebApplicationContext.handle(WebAppl > icationCon > text.java:544) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1637) > at org.mortbay.http.HttpServer.service(HttpServer.java:875) > at org.jboss.jetty.Jetty.service(Jetty.java:543) > at > org.mortbay.http.HttpConnection.service(HttpConnection.java:806) > at > org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:956) > at > org.mortbay.http.HttpConnection.handle(HttpConnection.java:823) > at > org.mortbay.http.SocketListener.handleConnection(SocketListene > r.java:203 > ) > at > org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290) > at > org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743) > at java.lang.Thread.run(Thread.java:484) > > > The formbean: > > import org.apache.struts.action.ActionForm; > > /** > * > * @author pteasdale > */ > public class AddTaxonomyRequestForm extends ActionForm { > > private String name="Untitled Classification"; > private String description = ""; > private String taxonomyPackageName=""; > private String returnPage=""; > private String newClassification = ""; > private String uuidx = ""; > private String addNode = "yes"; > > public AddTaxonomyRequestForm() { > } > > public String getName(){ > return name; > } > > public void setName(String classificationNodeName){ > this.name = classificationNodeName; > } > > public String getTaxonomyPackageName(){ > return taxonomyPackageName; > } > > public String getUuidx(){ > return uuidx; > } > public void setUuidx(){ > this.uuidx = uuidx; > } > public String getNewClassification(){ > return newClassification; > } > > public void setNewClassification(){ > > this.newClassification = newClassification; > } > > public void setTaxonomyPackageName(String taxonomyPackageName){ > this.taxonomyPackageName = taxonomyPackageName; > > } > > public void setDescription(String description){ > this.description = description; > } > > public String getDescription(){ > return description; > > } > public void setAddNode(String addNode){ > this.addNode = addNode; > } > public String getAddNode(){ > return addNode; > } > > /** Getter for property returnPage. > * @return Value of property returnPage. > */ > public java.lang.String getReturnPage() { > return returnPage; > } > > /** Setter for property returnPage. > * @param returnPage New value of property returnPage. > */ > public void setReturnPage(java.lang.String returnPage) { > this.returnPage = returnPage; > } > > //+++++++++++++++++++++++++++++++++++++++++++++++++++ > public String toString() { > > return "Form- name:"+getName()+" taxonomyPackageName: > "+getTaxonomyPackageName()+ > " newClassification: "+getNewClassification()+" > description: "+ > getDescription()+" returnPage: "+getReturnPage(); > > } > > public void reset(){ > > this.returnPage = ""; > this.name = ""; > this.newClassification = ""; > this.description = ""; > this.uuidx = ""; > this.taxonomyPackageName = ""; > > } > > The mapping: > > <!-- > Add Root Classification Node under a taxonomy package --> > <action path="/tree/addTaxonomy" > > type="com.betweenmarkets.web.tree.action.AddTaxonomyAction" > name="addTaxonomyForm" > scope="session" > input="/common/add_taxonomy.jsp"> > <forward name="success" path="/common/add_taxonomy_2.jsp"/> > <forward name="failure" path="/common/add_taxonomy.jsp"/> > </action> > <action path="/tree/addTaxonomy2" > > type="com.betweenmarkets.web.tree.action.AddTaxonomyAction" > name="addTaxonomyForm" > scope="request" > input="/common/add_taxonomy_2.jsp"> > <forward name="success" path="/common/pop_success.jsp"/> > <forward name="failure" path="/common/add_taxonomy_2.jsp"/> > </action> > > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
