1

I got this exception in time of running a web application in java. What does this mean?

exception.name = javax.servlet.ServletException: BeanUtils.populate
3
  • 2
    can you post full stacktrace? Commented Aug 10, 2010 at 10:44
  • A little bit of source code would help. Please post the servlet/jsp that is causing the exception. Commented Aug 10, 2010 at 10:45
  • 1
    This means that a ServletException was been thrown during BeanUtils.populate. That's the only reliable fact which can be given based on the information provided as far. For the remnant it's only guessing and shooting in the dark because the stacktrace including all root causes is missing. Commented Aug 10, 2010 at 12:48

3 Answers 3

2

I guess you are using something which utilizes Jakarta BeanUtils (like Struts) and some method is throwing an exception.

Following may be reasons for same :

  1. The action attribute of an tag must match exactly the path attribute of the action definition in the struts-config.xml file. This is how Struts associates the ActionForm bean with the action.
  2. This error usually occurs when you have specified a form name that does not exist in your tag. For example, you specifiec and 'myForm' is not the name of a form associated with myAction in the struts-config file
  3. You get this message when Struts is unable to map the data in the HTML form to the properties in your ActionForm bean. Make sure each of the properties on your bean is either a String or a boolean. Do you have any properties of type java.util.Date or other objects? That might cause this error. Also check to see that you have public getters and setter for each of your properties.

Check:

http://www.coderanch.com/t/53114/Struts/ServletException-BeanUtils-populate

http://forums.sun.com/thread.jspa?threadID=632599

http://javaexceptions1.blogspot.com/2009/08/javaxservletservletexception.html

Sign up to request clarification or add additional context in comments.

2 Comments

@Andreas_D added few more references :).
I came across the BeanUtils.populate exception when populating a collection and solved it with these docs: wiki.apache.org/struts/StrutsCatalogLazyList
2

A short call to google's famous www-indexer (with:"ServletException: BeanUtils.populate") provided this result:

ServletException BeanUtils populate

The answer to that question over there at coderanch could help to solve your problem

Comments

0

Since this is a Struts related exception (and seeing that we don't know the cause of the exception), here are some possible reasons why you're getting the exception.

  • No Bean Specified. This means that there is no ActionForm defined in your Action.
  • Your bean properties you're copying from doesn't match the bean properties you're matching to.

Unless we know the cause of the exception, you'll just have to debug your code and see what is the fault.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.