The stack trace indicates that you are extending
org.apache.struts.scaffold.BaseAction rather than just Action. 

I'm not familiar with the scaffold package - perhaps the forward "success"
has a special meaning within scaffold?

Paul

> -----Original Message-----
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 14, 2004 3:55 PM
> To: [EMAIL PROTECTED]
> Subject: NullPointerException - findSuccess(Unknown Source)
> 
> 
> Need your expertise to diagnose the problem.
> 
> I have a java class ListThread.java that extends
> Action. This java class simply calls a couple of
> helper classes to access my database. In the end of
> the ListThread.java, it is a standard statement:
> 
> return ( mapping.findForward( "success" ) );
> 
> 
> I have not yet prepared a JSP to be displayed in the
> browser after ListThread.java completes its tasks;
> therefore, upon completion, I temporarily wants the
> application to be forwarded to my welcome page. (My
> welcome page works fine.)
> 
> Because the ListThread.java does not really submit a
> form, I simply put name="articleForm" in the
> struts-config.xml file.  I have substituted with other
> forms for testing purpose.  Nonetheless, I always got
> Status 500 error:
> 
> ----- Root Cause -----
> java.lang.NullPointerException
> at
> org.apache.struts.scaffold.ParameterAction.findSuccess(Unknown
> Source)
> at
> org.apache.struts.scaffold.BaseAction.execute(Unknown
> Source)
> at
> org.apache.struts.action.RequestProcessor.processActionPerform
> (RequestProcessor.java:484)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProce
> ssor.java:274)
> .............
> .............
> 
> My struts-config.xml looks like:
> 
>     <action
>         roles="administrator,editor,contributor"
>         path="/message/ListThreads"
>         type="org.apache.artimus.message.ListThread"
>         name="articleForm"
>         scope="request"
>         validate="false">
>        <forward
>             name="success"
>             path="/signin/Welcome.jsp"/>
>     </action>
> 
> And here is my ListThread.java:
> 
> import LOTS OF PACKAGES AND CLASSES;
> 
> public final class ListThread extends Action
> {
>    public ActionForward execute(ActionMapping mapping,
>                                 ActionForm form,
>                                 HttpServletRequest
> request,
>                                 HttpServletResponse
> response)
>                                 throws Exception 
>    {
> 
>       String memberName = request.getRemoteUser();
> 
>       // for sort and order stuff
>       String sort  = request.getParameter( "sort" );
>       String order = request.getParameter( "order" );
> 
>       if ( sort.length() == 0 ) sort =
> "ThreadLastPostDate";
>       if ( order.length()== 0 ) order = "DESC";
> 
>       int offset  = 0;
>       int rows    =
> MessageInboxConfig.ROWS_IN_THREADS;
>       offset = Integer.parseInt( request.getParameter(
> "offset" ) );
>       rows = Integer.parseInt( request.getParameter(
> "rows" ) );
> 
>       ListThreadHandler lthandler = new
> ListThreadHandler();
>       ListPostHandler lphandler = new
> ListPostHandler();
> 
>       int totalThreads =
> lthandler.getNumberOfThreads_forReceiver( memberName
> );
>       if ( offset > totalThreads ) 
>       {
>          throw new BadInputException( "The offset is
> not allowed to be greater than total rows." );
>       }
> 
>       Collection beans =
> lthandler.getThreads_forReceiver_withSortSupport_limit(
> memberName, offset, rows, sort, order );
> 
>       SiteUtil.prepareNavigate( request, offset,
> beans.size(), totalThreads,
> MessageInboxConfig.ROWS_IN_THREADS );
>       int totalPosts =
> lphandler.getNumberOfPosts_forReceiver( memberName );
> 
>       request.setAttribute( "ThreadBeans", beans );
>       request.setAttribute( "TotalThreads", new
> Integer( totalThreads ) );
>       request.setAttribute( "TotalPosts", new Integer(
> totalPosts ) );
> 
>       return ( mapping.findForward( "success" ) );
> 
>    }
> }
> 
> 
> 
>       
>               
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! - Internet access at a great low price.
> http://promo.yahoo.com/sbc/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**********************************************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**********************************************************************


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

Reply via email to