> -----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]

Reply via email to