beanpopulate exception using struts

From: marco (marcbertholl_at_gmx.de)
Date: 03/30/04


Date: 30 Mar 2004 07:15:15 -0800

Hi,

I try to address more then one action with one form. Actually I'm
using the 'scaffold.http.RelayAction' class. I have both jars strus
and commons- scaffold in my WEB-INF- lib- folder.

This is the error I get trying to submit:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
--and so on-- at the end:

Caused by: java.lang.NullPointerException
        at mdpro.prototyp.form.ProtokollBearbeitenForm.setProtokoll_thema(ProtokollBearbeitenForm.java:128)
        ... 45 more
--------------------------------------------------------------------------

The submits and form in my jsp:

<html:form action="/protokollBearbeitenFind" focus="protokoll_thema">
 <INPUT TYPE="hidden" NAME="dispatch" VALUE="error" >
    <td class="tdButton">
 <html:submit onclick="set('speichern');" >Speichern</html:submit>
 <html:submit onclick="set('neu');" >Neu/html:submit>
    </td>
</html:form>
--------------------------------------------------------------------------
The javascript- method set:

  function set(target)
  {
   document.forms[0].dispatch.value=target;
  }

-----------------------------------------------------------------------------
The action- mapping in struts-config:

    <action path="/protokollBearbeitenFind"
              type="org.apache.scaffold.http.RelayAction"
              name="protokollBearbeitenForm"
              scope="request"
              validate="false">
    <forward name="speichern" path="/protokollSpeichern"/>
    <forward name="neu" path="/protokollNeu"/>
    </action>
----------------------------------------------------------------------------
I think the execute-method is implemented in the RelayAction with the
line:

    return (mapping.findForward(request.getParameter(Tokens.DISPATCH)));

--------------------------------------------------------------------------

I guessI miss a detail, but till jet I couldn't figure out what.

If you can help me I would appreciate

marcelino