You didn't post the source for your form bean so I can't give you a specific answer, but the exception indicates that BeanUtils is unable to convert the String value from the HTTP request to whatever type setXXX is expecting.

If you're hoping to have a HibernateObject instance automatically created in the form bean when the form is submitted I think you're going to be out of luck (I haven't used Hibernate so I don't know what a HibernateObject is, but I doubt it's something you can create from a simple String value).

Perhaps you could post the relevant code and/or describe exactly what you're trying to achieve.

L.

[EMAIL PROTECTED] wrote:
Hello,

I have problem with form.

I have form with Hibernate attribute XXX. The form has method getXXX, setXXX and getAllXXX.
I'm using this jsp snipplet:

<html:form .....>

  <html:select property="XXX"><html:options property="allXXX"/></html:select>

When I submit the form, then I recieve this an exception (see bottom)

My questing: Is possible to save a Hibernate objects?

The method getAllXXX returns ArrayList of HibernateObject...


Thanks Mila




type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: BeanUtils.populate
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
 cz.opensolutions.OSRequestProcessor.process(OSRequestProcessor.java:97)
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.IllegalArgumentException: argument type mismatch
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789) org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684) org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
 org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
 org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
 cz.opensolutions.OSRequestProcessor.process(OSRequestProcessor.java:97)
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to