File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Error msg: No bean specified Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error msg: No bean specified " Watch "Error msg: No bean specified " New topic

Error msg: No bean specified

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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)
void org.apache.commons.beanutils.BeanUtils.setProperty(java.lang.Object, java.lang.String, java.lang.Object)
void org.apache.commons.beanutils.BeanUtils.populate(java.lang.Object, java.util.Map)
void org.apache.struts.util.RequestUtils.populate(java.lang.Object, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)
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)
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
Shabeen Jafri

Joined: Dec 30, 2002
Posts: 6
Did you ever figure out this problem? I am having a similar issue.

mariellen mihopoulos

Joined: Feb 02, 2005
Posts: 1
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.
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

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.

A good workman is known by his tools.
Tim Azzopardi

Joined: Feb 25, 2005
Posts: 1
I had similar problem
java.lang.IllegalArgumentException: No bean specified
at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(
at org.apache.commons.beanutils.BeanUtils.setProperty(
at org.apache.commons.beanutils.BeanUtils.populate(
at org.apache.struts.util.RequestUtils.populate(
at org.apache.struts.action.RequestProcessor.processPopulate(
at org.apache.struts.action.RequestProcessor.process(
at org.apache.struts.action.ActionServlet.process(
at org.apache.struts.action.ActionServlet.doPost(
at javax.servlet.http.HttpServlet.service(

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" />
But ArtForStruts class had no default constructor.

<a href="" target="_blank" rel="nofollow"></a>
Nathan Hook
Ranch Hand

Joined: Jan 10, 2005
Posts: 81
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:

Best of Luck,

Doug Emery

Joined: Aug 08, 2002
Posts: 1
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:


Rhea Karnam

Joined: May 06, 2003
Posts: 21
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.
It is sorta covered in the JavaRanch Style Guide.
subject: Error msg: No bean specified
jQuery in Action, 3rd edition