• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error msg: No bean specified

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I have a problem with:
java.lang.IllegalArgumentException: No bean specified
java.beans.PropertyDescriptor org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(java.lang.Object, java.lang.String)
PropertyUtils.java:816
void org.apache.commons.beanutils.BeanUtils.setProperty(java.lang.Object, java.lang.String, java.lang.Object)
BeanUtils.java:846
void org.apache.commons.beanutils.BeanUtils.populate(java.lang.Object, java.util.Map)
BeanUtils.java:726
void org.apache.struts.util.RequestUtils.populate(java.lang.Object, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)
RequestUtils.java:978
void org.apache.struts.action.RequestProcessor.processPopulate(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.action.ActionForm, org.apache.struts.action.ActionMapping)
RequestProcessor.java:779
void org.apache.struts.action.RequestProcessor.process(javax.servlet.http

When iidObdobjaLastnistva from combo box is chosen and the submit is done, then i try another submit anf this error msg is thrown
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you ever figure out this problem? I am having a similar issue.

TIA
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your form you need to have instantiated your objects (duno how to say it, new to java/struts). I have had this problem about 5 times, and I always forget.

eg instead of

private User myUser;

you need

private User myUser = new User();

hope that helps - apparently this message is displayed for other errors as well.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seeing (java.lang.Object, java.lang.String) in your post leads me to believe you are using map-backed forms.

Mariellen is more than likely right on the nose in that your map is null.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had similar problem
java.lang.IllegalArgumentException: No bean specified
at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:837)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)


reason was as follows
Struts config for form was
<form-bean name="itemForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="art" type="com.tigerfive.struts.ArtForStruts" />
</form-bean>
But ArtForStruts class had no default constructor.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since ArtForStruts (strange name for an Object...) doesn't meet the java bean standards, then you can't use it in the way you are trying to.

You might want to look at a Java Bean tutorial here:
http://java.sun.com/docs/books/tutorial/javabeans/

Best of Luck,

Nate
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had this same problem, the "No bean specified" error --



-- in a case where I was using a indexed sub-form properties. In order set a property like childForm[0].field1, Struts has to get a ChildForm instance from a call to


I was quietly returning null if no form instance was found at index i.

I changed my code from:



to:

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had the same problem too. In my case, my ActionForm had a couple of ImageButtonBeans (ofcourse, not intialized). I had overriden the action form's reset() method to reset the X and Y coordinates of the ImageButtonBeans. I was clueless why the exception was thrown. Initializing the ImageButtonBeans to new ImageButtonBean(), in the ActionForm's constructor solved the problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic