2005/7/6, Simon Groenewolt <[EMAIL PROTECTED]>:
> hi,
> 
> I get errors like this while working on the forum:
> 
> > java.lang.NullPointerException
> >       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >       
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >       
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >       java.lang.reflect.Method.invoke(Method.java:324)
> >       
> > org.mmbase.util.functions.SetFunction.getFunctionValue(SetFunction.java:44)


This line is:
            return functionMethod.invoke(functionInstance,
parameters.toArray());

According to javadoc of Method, 'invoke' can give NPE if first
argument is null and the method is an instance method.

I would start with checking that, by adding a line of logging there
(or perhaps you can add a watch in your debugger).

Anyway, it may be useful to also inspect the values present in the
parameters array in the same way. You would see odd values in that
immediately. But if that would cause NPE in the function code itself,
I would not expect the stacktrace to originate from the reflection
code itself.

If indeed 'functionInstance' is null (which I suspect), then figure
out why is that. Perhaps somewhy the 'initialize' of SetFunction is
not called. Perhaps it has gotten confused by the negative parameter
before calling 'initalize' or so? I don't recall excactly when that is
supposed to happen, but surely it can't be hard to find that out.

Michiel
 
-- 
mihxil'  http://mihxil.komputilo.org/
nl_NL eo_XX en_US
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to