commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Problem using beanutils: MethodUtils.invokeMethod throw a null pointer exception
Date Thu, 01 Apr 2004 14:29:48 GMT


I'm using MethodUtils.invokeMethod(Object myObject, String methodName,
Object[] parameters) to do some reflection in my application and I got the
following problem:

I got a null point exception when passing as parameters a table with a null
value inside like this:  [, , null, avionCargoFret, , ]
The following code inside beanutils send me the exception when it does
getClass the null element of the table:

       Class parameterTypes [] = new Class[arguments];
        for (int i = 0; i < arguments; i++) {
            parameterTypes[i] = args[i].getClass();

Is this a misuse of the MethodUtils.invokeMethod?
Is this a known limitation of the implementation?
Is  this a bug?
Is there any solution out there?

Thanks by advance.


L'acces immediat aux meilleurs tarifs Air France et au billet electronique

For immediate access to the best Air France fares and to electronic
tickets, visit our website

Les donnees et renseignements contenus dans ce message sont personnels,
confidentiels et secrets. Ce message est adresse a l'individu ou l'entite
dont les coordonnees figurent ci-dessus. Si vous n'etes pas le bon
destinataire, nous vous demandons de ne pas lire, copier, utiliser ou
divulguer cette communication. Nous vous prions de notifier cette erreur a
l'expediteur et d'effacer immediatement cette communication de votre
The information contained in this message is privileged, confidential, and
protected from disclosure. This message is intended for the individual or
entity adressed herein. If you are not the intended recipient, please do
not read, copy, use or disclose this communication to others; also please
notify the sender by replying to this message, and then delete it from your

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message