views:

99

answers:

4

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

exception.name = javax.servlet.ServletException: BeanUtils.populate
+1  A: 

A little bit of source code would help. Please post the servlet/jsp that is causing the exception.

Kurt Du Bois
Not really an answer... More appropriate as a comment...
Alderath
A: 

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

YoK
@Andreas_D added few more references :).
YoK
+2  A: 

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

Andreas_D
A: 

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.

The Elite Gentleman