> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, December 13, 2004 4:44 PM > To: [EMAIL PROTECTED] > Subject: RE: Error in CactusStrutsTestCase > > > > This one is a real pain because there is no real failure in > my logs. Just > the error I posted which came from my testcase page only. > > The closest thing I can figure, is this is where the error is > happening: > ============================================================== > =========== > if( > Constants.TRUE.equals( > request.getParameter(Constants.BUS_CARD_SELECTED) > ) > ) { > navigationBean.setHasBusinessCard(true); > } else { > > request.getSession().removeAttribute(Constants.BUSINESSCARD_FORM);
This is the only place you're writing anything, and it's not to the request. So, I don't think it's here, I think it's when you actually write to the request. THat's what the error message says. > navigationBean.setHasBusinessCard(false); > } > > > Note that there are 17 iterations, and there are only 4 that > have an if() > for them. 1 for each of our 4 products. This is the second product in > the list. So one of the products (businessLine), was already > executed in > this test before the businessCard which is where it fails. Move this one last, and see if the other three work..... > > > > -------------------- > Mick Knutson > Wells Fargo Business Direct > (415) 222-1020 > > "This message may contain confidential and/or privileged > information. If you are not the addressee or authorized to > receive this for the addressee, you must not use, copy, > disclose, or take any action based on this message or any > information herein. If you have received this message in > error, please advise the sender immediately by reply e-mail > and delete this message. Thank you for your cooperation." > -------------------- > > > > -----Original Message----- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Monday, December 13, 2004 3:33 PM > To: Struts Users Mailing List > Subject: RE: Error in CactusStrutsTestCase > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > > Sent: Monday, December 13, 2004 4:20 PM > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Subject: Error in CactusStrutsTestCase > > > > > > I have the following method that keeps failing and I don't > > know why. The method should really only set a NavigationBean > > into session, then forward to a page based on the action parameter. > > ================================================================ > > > > public void testProductSelection() throws Exception { > > // JUnitDoclet begin method productSelection > > > > NavigationBean navigationBean = null; > > > ummmm... where is the code in the action that is failing? > > <snip/> > > The exception indicates that you are trying to write to a > response that's been committed, but your test harness > doesn't help much in figuring out why. Your test harnes is > working, since it works 13 times before failing. > > > > I get this error on the 14th iteration: > > ============================================= > > > > > > > > java.lang.IllegalStateException: response already committed > > at > > weblogic.servlet.internal.ServletResponseImpl.sendRedirect(Ser > > vletResponseImpl.java:584) > > at > > servletunit.struts.StrutsResponseWrapper.sendRedirect(StrutsRe > > sponseWrapper.java:154) > > at > > org.apache.struts.action.RequestProcessor.processForwardConfig > > (RequestProcessor.java:385) > > at > > org.apache.struts.tiles.TilesRequestProcessor.processForwardCo > > nfig(TilesRequestProcessor.java:316) > > at > > org.apache.struts.action.RequestProcessor.process(RequestProce > > ssor.java:231) > > at > > org.apache.struts.action.ActionServlet.process(ActionServlet.j > > ava:1164) > > at > > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) > > at > > servletunit.struts.CactusStrutsTestCase.actionPerform(CactusSt > > rutsTestCase.java:537) > > at > > com.wf.bd.ice.creditapplication.CreditApplicationActionsTest.t > > estProductSelection(CreditApplicationActionsTest.java:195) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess > > orImpl.java:39) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > > odAccessorImpl.java:25) > > at > > org.apache.cactus.internal.AbstractCactusTestCase.runBareServe > > r(AbstractCactusTestCase.java:153) > > at > > org.apache.cactus.internal.server.AbstractWebTestCaller.doTest > > (AbstractWebTestCaller.java:119) > > at > > org.apache.cactus.internal.server.AbstractWebTestController.ha > > ndleRequest_aroundBody0(AbstractWebTestController.java:93) > > at > > org.apache.cactus.internal.server.AbstractWebTestController.ha > > ndleRequest_aroundBody1$advice(AbstractWebTestController.java:124) > > at > > org.apache.cactus.internal.server.AbstractWebTestController.ha > > ndleRequest(AbstractWebTestController.java) > > at > > org.apache.cactus.server.ServletTestRedirector.doPost_aroundBo > > dy2(ServletTestRedirector.java:101) > > at > > org.apache.cactus.server.ServletTestRedirector.doPost_aroundBo > > dy3$advice(ServletTestRedirector.java:124) > > at > > org.apache.cactus.server.ServletTestRedirector.doPost(ServletT > > estRedirector.java) > > at > > org.apache.cactus.server.ServletTestRedirector.doGet_aroundBod > > y0(ServletTestRedirector.java:72) > > at > > org.apache.cactus.server.ServletTestRedirector.doGet_aroundBod > > y1$advice(ServletTestRedirector.java:124) > > at > > org.apache.cactus.server.ServletTestRedirector.doGet(ServletTe > > stRedirector.java) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > at > > weblogic.servlet.internal.ServletStubImpl$ServletInvocationAct > > ion.run(ServletStubImpl.java:971) > > at > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle > > tStubImpl.java:402) > > at > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle > > tStubImpl.java:305) > > at > > weblogic.servlet.internal.WebAppServletContext$ServletInvocati > > onAction.run(WebAppServletContext.java:6350) > > at > > weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe > > nticatedSubject.java:317) > > at > > weblogic.security.service.SecurityManager.runAs(SecurityManage > > r.java:118) > > at > > weblogic.servlet.internal.WebAppServletContext.invokeServlet(W > > ebAppServletContext.java:3635) > > at > > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe > > questImpl.java:2585) > > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) > > > > > > > > -------------------- > > Mick Knutson > > Wells Fargo Business Direct Information Systems > > (415) 222-1020 > > > > "This message may contain confidential and/or privileged > > information. If you are not the addressee or authorized to > > receive this for the addressee, you must not use, copy, > > disclose, or take any action based on this message or any > > information herein. If you have received this message in > > error, please advise the sender immediately by reply e-mail > > and delete this message. Thank you for your cooperation." > > -------------------- > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]