So... we still have no idea what exception is being thrown.
That makes it really hard to even begin.
Dave
--- On Mon, 8/18/08, Pranab <chinu.struts@(protected):
> From: Pranab <chinu.struts@(protected)>
> Subject: Re: Re: NullPointer Exception On IE7
> To: "Struts Users Mailing List" <user@(protected)>
> Cc: "Dave Newton" <newton.dave@(protected)>
> Date: Monday, August 18, 2008, 7:59 AM
> Thanks Dave, if this violates the mailing list policy then
> I'm sorry for that.
>
> But the amazing thing is that I'm not getting any sort
> of error in log with descriptive information. The
> application is working very fine at our end, also for most
> of the users only few people are getting NullPointer
> Exceptions.
>
> Whenever they are trying to search a project, the
> application searches it in the database and open the result
> in a new window. And the error is displaying in that window.
>
>
> Struts-config.xml
> =================
> Error:
> <global-forwards
> type="
org.apache.struts.action.ActionForward">
> ...
> <forward name="unexpectedError"
> path="/error/Error.jsp" />
> ...
> </global-forwards>
> .
> .
> .
> .
> <action path="/projectSearch"
> type="com.myapp.projecttracking.search.ProjectSearch"
> name="projectSearchForm"
> input="/main/projectSearch.jsp"
> validate="true"
> scope="session">
> <forward name="success"
> path="/main/projectSearchResults.jsp"/>
> <forward name="newSearch"
> path="/setupProjectSearch.do"/>
> </action>
> ====================
>
> ProjectSearch.java
> ==================
> public class ProjectSearch extends Action {
>
>
> static Logger log = Logger.getLogger(ProjectSearch.class);
>
> public ActionForward execute(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException {
>
>
>
>
> HttpSession session = request.getSession();
> GSServices gs = (GSServices)
> (session.getServletContext().getAttribute(Constants.GSServices));
>
> Properties props = gs.getAdminSettings();
> log.debug("Propos: "+props);
> ProjectSearchForm searchForm = (ProjectSearchForm)
> form;
>
>
> session.setAttribute(Constants.SEARCHFORM,searchForm);
>
>
>
>
> String memberID = (String)
> session.getAttribute("memberID");
> /* Temporary Change to run the application --- Tarun Kumar
> String memberID =
> gs.getGatewaySpecificConfig().getProperty(GSServices.PT_USER_NAME);
> log.debug("User name="+memberID);
>
>
> memberID =
> memberID.substring(memberID.lastIndexOf('\\')
> + 1);
> */
> //Catchall if some page wants to redisplay search
> results but form is null
> if (searchForm == null) {
> return mapping.findForward("newSearch");
> }
>
> searchForm.setMemberID(memberID);
>
> int pageSize = Constants.DEFAULT_PAGE_SIZE;
>
>
>
> try {
> int i=searchForm.getResultsPerPage();
> if (i >= Constants.MIN_PAGE_SIZE || i <=
> Constants.MAX_PAGE_SIZE) {
> pageSize = i;
> }
> } catch (NumberFormatException e) {
> pageSize = Constants.DEFAULT_PAGE_SIZE;
> }
>
> searchForm.setPageSize(pageSize);
>
> String pageRequested =
> request.getParameter(Constants.RK_PAGE_NUMBER);
> if (pageRequested != null) {
> try {
> searchForm.setPageRequested(Integer.parseInt(pageRequested));
> } catch(NumberFormatException e) {
> //page number specified in the HTTP request was not a
> number, ignore
> }
> } else {
> searchForm.setPageRequested(1);
> }
>
> String sortByField =
> request.getParameter(Constants.RK_SORT_BY_FIELD);
> if (sortByField != null) {
> try {
> searchForm.setSortByField(Integer.parseInt(sortByField));
> } catch(NumberFormatException e) {
> //page number specified in the HTTP request was not a
> number, ignore
> }
> }
>
> ActionErrors errors = new ActionErrors();
>
>
>
> try {
>
> SearchCommand search = new SearchCommand();
>
> //ProjectSearchForm implements ISearchCriteria, so we
> can
> //safely pass it to the business layer without tying
> the
> //business layer to Struts or the Servlet API
> log.debug("Before searching ");
>
>
>
> log.debug("User's Adgroups are :
> "+(ArrayList)session.getAttribute(Constants.SK_ADGROUPS));
> ArrayList arradgroups=
> (ArrayList)session.getAttribute(Constants.SK_ADGROUPS);
> String adgroup;
> boolean isGPCMember= false;
> boolean isLPCMember= false;
> if(arradgroups!=null){
> Iterator iter = arradgroups.iterator();
> while (iter.hasNext()) {
> adgroup= (String) iter.next();
> if(Constants.ROLE_GPC.equals(adgroup)){
> isGPCMember=true;
> }
> if(Constants.ROLE_LPC.equals(adgroup)){
> isLPCMember=true;
> }
> }
> }
>
>
> SearchResults results = search.execute(props,
> searchForm, false, isGPCMember, false, isLPCMember);
> log.debug(".............After
> search.execute...........results.toString()===="+results.toString());
> request.setAttribute(Constants.RK_SEARCH_RESULTS,
> results);
>
> session.setAttribute(Constants.ISEDITABLE,Boolean.FALSE);
>
>
> return mapping.findForward("success");
>
> } catch (NullPointerException e) {
>
> log.error(e);
>
> //Another action was likely trying to redisplay search
> results, but the
> //search criteria form is not in a valid state
> return mapping.findForward("newSearch");
>
> } catch (Exception e) {
>
>
> try
>
> {
>
> SchedulerVO vo = new SchedulerVO();
>
> //Properties props = ((GSServices)
> session.getServletContext().getAttribute(Constants.GSServices)).getAdminSettings();
>
> TransactionContext tc = new
> TransactionContext(props, false);
> vo.setDetailMessage(e.toString());
> vo.setSpecificMessage("Error in
> getting search results");
> vo.setFormData(searchForm.toString());
> Util.errorTrack(tc, vo);
>
> }
>
> catch (Exception ex)
>
> {
>
> log.error("Exception in inserting
> Error in DB from ProjectSearch.");
>
> }
>
>
>
> log.error(e.getMessage());
> errors.add(ActionErrors.GLOBAL_ERROR, new
> ActionError("error.message", e.getMessage()));
> saveErrors(request, errors);
> return
> mapping.findForward("unexpectedError");
> }
>
> }
>
> }
> ==================
>
> Error.jsp, timeout.jsp, and NotAuthorized.jsp are three
> error pages in my application.
>
> Let me know if I'm wrong at any point.
>
> - Pranab
>
>
> On Mon, 18 Aug 2008 Dave Newton wrote :
> >Attachments aren't propagated to the mailing list.
> If you really think a screenshot is the best way to capture
> textual information you could post it to any of several free
> internet picture sites.
> >
> >More information would be... helpful. Things like the
> configuration of the action that's throwing the
> exception.
> >
> >Dave
> >
> >
> >--- On Mon, 8/18/08, Pranab
> <chinu.struts@(protected):
> >
> > > From: Pranab <chinu.struts@(protected)>
> > > Subject: NullPointer Exception On IE7
> > > To: user@(protected)
> > > Cc: ayushverma@(protected)
> > > Date: Monday, August 18, 2008, 5:24 AM
> > > Hi Folks,
> > >
> > > We are facing NullPointer Exceptions in IE7,
> though such
> > > error are not coming in IE6, actually this error
> is coming
> > > at our client on IE7 only. We unable to recreate
> the same at
> > > our side even in IE7.
> > >
> > > Implementation-Version: 1.0
> > > Specification-Title: Struts Framework
> > > Specification-Version: 1.0
> > > Implementation-Title: Struts Framework
> > > Extension-Name: Struts Framework
> > > Created-By: Ant 1.4.1
> > > Internet Explorer: 7.0
> > > JRE: 1.4.x
> > > Plumtree Portal: version 4.5 WS1
> > > Deployment Server: Weblogic 8.1 SP5
> > >
> > > Also please find attached is the screen shot of
> error for
> > > your reference. We have implemented the Struts
> based web
> > > application on Plumtree portal.
> > >
> > > If checking log, only one session is showing for
> each
> > > nullpointer exceptions nothing else.
> > >
> > > Please let me know if you need anymore details on
> this.
> > >
> > > -
> > >
> Pranab---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > > For additional commands, e-mail:
> > > user-help@(protected)
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> >For additional commands, e-mail:
> user-help@(protected)
> >
I'd be immediately suspicious of your manual form submission; as a guess I'd say that bypasses the normal form submission process, making it a non-XHR request.
Off-the-cuff guess, though.
Dave
--- On Mon, 8/18/08, MyAshok <takumar.eng@(protected):
> From: MyAshok <takumar.eng@(protected)>
> Subject: Re: struts2: simple ajax form - returns value to a new page (not to a DIV)
> To: user@(protected)
> Date: Monday, August 18, 2008, 8:08 AM
> Thanks Evans,
>
> In IE, instead of loading text it shows [object error]. But
> it redirects to
> a new page.
>
> In Firefox, neither showing loading text nor object error.
> It redirects to a
> new page.
>
>
> <s:submit theme="ajax"
> value="Activate" id="activate"
> showLoadingText="false"
> targets="targetid"
> onclick="javascript:activatePartnerSubscriber();"
> />
>
> script
> ------
>
> function activatePartnerSubscriber() {
>
> subCount =
> document.getElementById('subCount').value;
>
> var count = selectedCheckBoxCount();
> if (count >= 1) {
>
> document.getElementById('SubscriberForm').action
> ='/myproj/activate.action';
>
> document.getElementById('SubscriberForm').submit();
> } else {
> alert("Please select atleast one Subscriber");
> }
> }
>
> I am unable to find where the ajax request is missing.
> Please Give some
> ideas to proceed.
>
> with hope,
> Ashok
>
>
>
>
> Jeromy Evans - Blue Sky Minds wrote:
> >
> > MyAshok wrote:
> >> I do have the same issue. on click of submit, the
> loadingtext is
> >> displaying
> >> but the result in a new page as i am redirect to a
> action.
> >>
> >> Any solutions? please asap.
> >>
> >> <action name="activateSubscriber"
> class="subscriberAction"
> >> method="activateSubscriber">
> >> <result name="success"
> type="redirect-action">viewPartners</result>
> >> </action>
> >> Waiting for reply......
> >>
> >>
> >
> > If it's performing a full-page redirect, then your
> form did a plain old
> > post/get to the action, not ajax.
> > You will need to isolate why the request wasn't
> sent via XHR. That
> > means it's a client-side problem, not a struts.xml
> problem.
> >
> > As a guess, without any context, if you've only
> tested in IE so far,
> > turn off the loadingText message.
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/struts2%3A-simple-ajax-form---returns-value-to-a-new-page-%28not-to-a-DIV%29-tp15562626p19030271.html
> Sent from the Struts - User mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)
Hi friends I am getting the following error. I think it is a known issue.
Kindly help me in this.
No configuration found for the specified action: 'executePoPSearch.action'
in namespace: '/p'. Form action defaulting to 'action' attribute's literal
value.
Warm regards,
Muralidhar Y
muralidhary@(protected)
US Main: 877 KENSIUM (536.7486)
India Main: +91 9949495511
India Fax: +91 9949495522
Kensium
200 S Wacker Dr, Suite 3100
Chicago, IL 60606
Confidentiality Note:
-----------------------------
The information contained in this e-mail is strictly confidential and for
the intended use of the addressee only. Any disclosure, use or copying of
the information by anyone other than the intended recipient is prohibited.
If you have received this message in error, please notify the sender
immediately by return e-mail and securely discard this message.
_____