Bala,
This error  might be becaue in ur struts-config.xml  u have not specified the
form bean.
In  ur  <action-mappings>
u have the logical  name for Form bean for that Action class
</action-mappings>
Check inside  the tag
 <form-beans>
whether the form bean for the request is there or not.
 </form-beans>
Form Bean bein g accessed and given null pointer can be because it is not
populated when the form is submitted. This can occur because u might not have
associated the form bean with the request in struts config file and only
associate the request with action class or Maybe u have not given the complete
name inclufin gpackage name /relative name whatever u are using.

regards
Vishal


Vincent Massol wrote:

> Bala,
>
> Apparently you're not the only one having this problem. I have seen the
> same issue being raised. I don't know the answer as I've not used
> StrutsTestCase. Maybe you could also post the question on the
> StrutsTestCase forum/mailing-list on SourceForge (I don't know if
> there's any but there might be).
>
> Also, you might have some luck on the Struts users mailing list.
>
> Alternatively, if you don't get any answer, you can also debug the
> problem and submit a patch ;-)
>
> Good luck,
> -Vincent
>
> > -----Original Message-----
> > From: BALA KRISHNA [mailto:[EMAIL PROTECTED]]
> > Sent: 27 February 2002 23:17
> > To: [EMAIL PROTECTED]
> > Subject: struts testcase... NullPointerException...
> >
> > Hi,
> >
> > I am not sure if this is the place to post this...
> >
> > I am testing struts action classes using
> > strutstestcase1.5 (servlet2.2) with cactus 1.2.
> >
> > The test class extends CactusStrutsTestCase. I get the
> > following error. Can anyone explain me what is that I
> > am not doing right.
> >
> > =========================
> >
> > Testcase: testSuccessfulLogin took 4.306 sec
> >       Caused an ERROR
> > null
> > java.lang.NullPointerException
> >       at
> >
> servletunit.struts.CactusStrutsTestCase.actionPerform(CactusStrutsTestCa
> se
> > .java:213)
> > ...
> >
> > ==========================
> >
> > The login action class that I am testing has a
> > associated loginform bean. This error is occuring only
> > when I test this action class that has a associated
> > actionform bean. My other action classes tests work
> > fine.
> >
> >
> > Thanks,
> > balki
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Greetings - Send FREE e-cards for every occasion!
> > http://greetings.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:   <mailto:cactus-user-
> > [EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:cactus-user-
> > [EMAIL PROTECTED]>
> >
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to