Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / March 2004

Tip: Looking for answers? Try searching our database.

beanpopulate exception using struts

Thread view: 
marco - 30 Mar 2004 16:15 GMT
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
Thorsten Langer - 30 Mar 2004 22:42 GMT
Hi Marco!

  Can you please post the setProtokoll_thema() method? or
at least the 128. line?

 Thorsten


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.