Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

InvocationTargetException ...  RSS feed

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys --- does anyone know about
why an invocation target exception would be thrown
when using the apache beanutils library ?

BeanUtils.describe( this );

where this is simply an object with getters and setters?
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Possibly because the object is not [i]exactly[/] a bean - maybe a getter or setter is not public, or the required typse don't match. Look at the stack trace to see which property of the bean is accessed when the exception is thrown, and then check the methods related to that property.
If that doesn't help, post the stack trace, and a short, relevant excerpt from the bean, and we'll take a look at it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!