Response Already Committed

          I frequently get errors in the Weblogic log file (actually a nohup.out file) with
          the following error:
          <Sep 16, 2002 4:39:25 PM CDT> <Error> <HTTP> <[WebAppServletContext(5997858,esn,/esn)]
          Servlet failed with Exception
          java.lang.IllegalStateException: response already committed
          What does the mean?
          thanks
          Ryan
          

jsp:include does an implicit flush. If your JSP does an jsp:include and the
          included JSP attempts the redirect then you should see the exception (per
          JSP 1.1 spec).
          "Ryan Richards" <[email protected]> wrote in message
          news:[email protected]...
          >
          > I am not doing either one of those explicitly in my code so I would have
          to assume
          > it is a service pack issue.
          >
          > Thanks
          > Ryan
          >
          > "Nagesh" <[email protected]> wrote:
          > >
          > >Wait a minute..
          > >If the response has already been flushed /committed the sendRedirect
          > >method throws
          > >an IllegalStateException. (from the javadocs)
          > >
          > >This requirement is built into the spec because once the response is
          > >flushed,
          > >the headers have been already written and
          > >sendRedirect actually tries to send headers which will thus fail
          > >
          > >So the gist is that sendRedirect should be called before you have written
          > >the
          > >amount sepcified by getBufferSize() or before you do an explicit flush()
          > >on the
          > >ServletOutputStream
          > >
          > >-nagesh
          > >
          > >
          > >
          > >Rajesh Mirchandani <[email protected]> wrote:
          > >>Try SP3.
          > >>
          > >>Ryan Richards wrote:
          > >>
          > >>> Thanks for the help. WLS6.1 SP2:
          > >>>
          > >>> <Sep 18, 2002 8:53:24 AM CDT> <Error> <HTTP>
          <[WebAppServletContext(5997858,esn,/esn)]
          > >>> Servlet failed with Exception
          > >>> java.lang.IllegalStateException: response already committed
          > >>> at
          weblogic.servlet.internal.ServletResponseImpl.sendRedirect(ServletResponseIm
          pl.java:495)
          > >>> at
          net.dobson.servlets.ProcessServlet.doPost(ProcessServlet.java:114)
          > >>> at
          javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
          > >>> at
          javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          > >>> at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
          :265)
          > >>> at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
          :200)
          > >>> at
          weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
          ntext.java:2495)
          > >>> at
          weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
          :2204)
          > >>> at
          weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
          > >>> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          > >>> >
          > >>>
          > >>> "Narayan Anand" <[email protected]> wrote:
          > >>> >pls paste the full stack trace of the exception along with the WLS/SP
          > >>> >version.
          > >>> >
          > >>> >
          > >>> >Best Regards,
          > >>> >Narayan Anand
          > >>> >Developer Relations Engineer
          > >>> >BEA Systems, Inc.
          > >>> >[email protected]
          > >>> >
          > >>> >
          > >>> >"Ryan Richards" <[email protected]> wrote in message
          > >>> >news:[email protected]...
          > >>> >>
          > >>> >> I frequently get errors in the Weblogic log file (actually a
          nohup.out
          > >>> >file) with
          > >>> >> the following error:
          > >>> >>
          > >>> >> <Sep 16, 2002 4:39:25 PM CDT> <Error> <HTTP>
          > >>> ><[WebAppServletContext(5997858,esn,/esn)]
          > >>> >> Servlet failed with Exception
          > >>> >> java.lang.IllegalStateException: response already committed
          > >>> >>
          > >>> >> What does the mean?
          > >>> >>
          > >>> >> thanks
          > >>> >> Ryan
          > >>> >
          > >>> >
          > >>
          > >>--
          > >>Rajesh Mirchandani
          > >>Developer Relations Engineer
          > >>BEA Support
          > >>
          > >>
          > >
          >
          

Similar Messages

  • Exporting a PDF from an ATG servlet: IllegalStateException: Response already committed

    High-level question
    When a custom servlet in my ATG servlet pipeline writes a PDF document into the HTTP response output stream, although the PDF is delivered to the user's client browser successfully, an error is logged on the server: Servlet failed with Exception  java.lang.IllegalStateException: Response already committed".  Why does this occur?
    Details
    My ATG 10.1.2 application has a requirement to be able to generate and return to the client browser a PDF document when a particular button on the site is clicked.
    Although I'm not sure whether or not it's an ATG best practice, the approach that I landed on for this was to insert a new custom servlet, "PdfExportServlet", into the ATG servlet pipeline.  The PdfExportServlet, for requests that it determines are PDF requests and decides to handle, generates the PDF content (using the Jasper Reports engine), and writes the PDF content to the HTTP response output stream.  Here's the relevant portion of the code:
    response.setContentType("application/pdf");
    // (...Code that generates a JasperPrint object with the PDF content...)
    final byte[] pdfBinaryContent = JasperExportManager.exportReportToPdf(jasperPrint);
    response.setContentLength(pdfBinaryContent.length);
    final ServletOutputStream outputStream = response.getOutputStream();
    outputStream.write(pdfBinaryContent);
    outputStream.flush();
    outputStream.close();
    This works fine, and the PDF does display in the client browser.  However, an error is also logged in the application's log file on the server:
    <WL-101020> <[ServletContext@1369332778[app:storeFront module:shop path:/shop spec-version:2.5]] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
        at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1631)
        at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:637)
        at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:602)
        at weblogic.servlet.FileServlet.findSource(FileServlet.java:269)
        at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:191)
        at weblogic.servlet.FileServlet.service(FileServlet.java:173)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at atg.servlet.GenericFilterService.doFilterChain(GenericFilterService.java:621)
    A frustrating thing about this error which had made it difficult to troubleshoot is that it does not occur on my local development PC; this log message only appears when the application is running on one of our pre-production or production servers.  This has made trying to rapidly iterate through multiple possible solutions problematic, as each change to the code requires a fresh deployment to our shared pre-production server, which is time-consuming.
    I have tried the following variations on the above code, neither of which has produced a change in the manifestation of the issue (the error message appearing in the log):
    Added a call to response.flushBuffer() after the call to outputStream.close(), on the theory that this might serve to notify downstream servlets that the request has already been committed and no further attempts to modify and/or commit the request should be made.
    Removed the calls to outputStream.flush() and outputStream.close(), on the theory that some downstream servlet pipeline member (TailPipelineServlet?) might be responsible for closing out the outputStream, and trying to do that prematurely was responsible for the error.
    I also so far haven't found anything relevant in the ATG/Oracle documentation that might provide a clue as to what's going on here, or what the general best practice is regarding having a custom servlet in the ATG pipeline that outputs to the response's outputStream.
    Any advice regarding the root cause of this error and/or what should be done to fix it would be most welcome!
    Thanks,
    -Jon

    Here's the full stack trace from the log (which includes the PdfExportServlet):
    <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1386007041311> <WL-101020> <[ServletContext@1369332778[app:storeFront module:shop path:/shop spec-version:2.5]] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
    at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1631)
    at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:637)
    at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:602)
    at weblogic.servlet.FileServlet.findSource(FileServlet.java:269)
    at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:191)
    at weblogic.servlet.FileServlet.service(FileServlet.java:173)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at atg.servlet.GenericFilterService.doFilterChain(GenericFilterService.java:621)
    at atg.servlet.GenericFilterService.handleDoFilter(GenericFilterService.java:484)
    at atg.servlet.GenericFilterService.doFilter(GenericFilterService.java:431)
    at atg.filter.ConditionalDelegatingFilter.doFilter(ConditionalDelegatingFilter.java:113)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at atg.service.configuration.ResponseWrappingConfiguration.invokeFilterChainWithPossibleWrapping(ResponseWrappingConfiguration.java:457)
    at atg.servlet.pipeline.TailPipelineServlet.service(TailPipelineServlet.java:174)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at com.mycompany.purchase.PdfExportServlet.service(PdfExportServlet.java:73)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:275)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.endeca.assembler.AssemblerPipelineServlet.service(AssemblerPipelineServlet.java:442)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.http.CookieBufferServlet.service(CookieBufferServlet.java:119)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.ExpiredPasswordServlet.service(ExpiredPasswordServlet.java:378)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.MimeTyperPipelineServlet.service(MimeTyperPipelineServlet.java:228)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:657)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.commerce.order.CommerceCommandServlet.service(CommerceCommandServlet.java:150)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.commerce.promotion.PromotionServlet.service(PromotionServlet.java:213)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:320)
    at com.mycompany.browse.EndecaSessionStateTrackerServlet.service(EndecaSessionStateTrackerServlet.java:97)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.AccessControlServlet.service(AccessControlServlet.java:696)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.sessionsaver.SessionSaverServlet.service(SessionSaverServlet.java:2447)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.PageEventTriggerPipelineServlet.service(PageEventTriggerPipelineServlet.java:191)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.multisite.SiteSessionEventTriggerPipelineServlet.service(SiteSessionEventTriggerPipelineServlet.java:161)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.SessionEventTrigger.service(SessionEventTrigger.java:512)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.ProfilePropertyServlet.service(ProfilePropertyServlet.java:230)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at com.mycompany.servlet.pipeline.ThreadNameServlet.service(ThreadNameServlet.java:89)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.ProfileRequestServlet.service(ProfileRequestServlet.java:460)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:491)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.URLArgumentPipelineServlet.service(URLArgumentPipelineServlet.java:302)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.PathAuthenticationPipelineServlet.service(PathAuthenticationPipelineServlet.java:392)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.security.ThreadUserBinderServlet.service(ThreadUserBinderServlet.java:113)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:234)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.SecurityServlet.service(SecurityServlet.java:195)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.multisite.SiteContextPipelineServlet.service(SiteContextPipelineServlet.java:448)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1271)
    at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:952)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:272)
    at atg.filter.dspjsp.PageFilter.innerDoFilter(PageFilter.java:349)
    at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:208)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3739)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3705)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2282)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2181)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

  • Beating Akamai timeout & Response Already Committed exception

    Hi Gurus,
    Have an interesting scenario. To cut the long story short, in our scenario, the browser requests are routed to our server through Akamai, which is a 3rd party array of servers that are spread over geographies and cache static content, in order to ensure the request is routed through the nearest Akamai server to our WLS server. Akamai timeout threshold is maxed at 15 minutes. One of our transactions are time intensive and runs between 20-25 minutes. As you would have guessed, the connection is idle until process completes, akamai timeout is kicking in and closing the connection. Hence browser throws a javascript alert saying 'A connection to the server has failed'.
    Q) So, the direct question is, is there a mechanism in ADF to send heartbeat or ping signal to the browser periodically so that the connection will be kept open.
    We built a simple POC and beat Akamai timeout, by spawning a thread on server side that keeps writing a heartbeat signal something like "<!-- heartbeat -->" into ServletOutputStream periodically, just before invoking the long-running-proces. We could successfully beat Akamai timeout, but the problem is finally when the long-running-process completes and ready to proceed with rest of lifecycle, it fails with the popular exception "Response that is already committed". Though the error can be prevented by ctx.responseComplete(), it throws a blank page.
    Couple of things puzzling us:
    1) Why not simple ADF continue with rest of lifecycle phases and write to the same outputstream , in which case "response already committed" exception will not happen
    2) Is ADF internally doing any redirect ? Because it is a command button (Non-PPR) that initiates the entire call.
    3) Any other suggestions or best approaches or tweaks are appreciated
    JDEV Version: 11.1.1.3
    Code snippet is as follows:
            FacesContext ctx = FacesContext.getCurrentInstance();
            HttpServletResponse resp = (HttpServletResponse)ctx.getExternalContext().getResponse();
            HttpServletRequest req = (HttpServletRequest)ctx.getExternalContext().getRequest();
            ServletOutputStream out;
            hbThread = new HeartBeatThread();
            Object result = null;
            try {
                out = resp.getOutputStream();
                 hbThread.setOut(out);
                OperationBinding binding = ADFUtils.getOperationBinding("copyQuoteStub");
    // -- heartbeat thread started
                 hbThread.start();
    // -- Long running process invoked
                result = binding.execute();
    // -- Long running process ended
    // -- heartbeat thread stopped
                hbThread.stop();
       ctx.responseComplete();Heartbeat thread code:
          public void run() {
              while(sendHeartbeat) {
                    try {
                        System.out.println("...............BKB::Heartbeat Thread heartbeat " + new Date());
                        out.write(heartbeatSignal.getBytes());
                        out.flush();
                        Thread.currentThread().sleep(1000);
                    } catch (Exception e) {
                        e.printStackTrace();
          }Thanks a ton
    Srini
    Edited by: sangara on Mar 21, 2013 8:45 PM

    Sorry to bump it up, but just wanted to make sure it is not buried and get unnoticed as there are many threads posted later.

  • Jsp:forward failed with 'Response already committed'

    I got a "Response already commited" error when using logic:forward or jsp:forward inside a JSP page fragment that is part of a Struts Tiles layout.
    Here is the code fragment included in the layout.jsp.
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <logic:notPresent name="user" scope="session">
         <logic:forward name="login" />
    </logic:notPresent>
    Here is the error message:
    [ServletException in:/WEB-INF/tiles/verifyLogin.jsp] Exception forwarding for name login: java.lang.IllegalStateException: Cannot forward. Response already committed. (Servlet 2.3, SRV 8.4)'

    Jsp normally buffers output in a 8k buffer and write it to the output stream (i.e. "commits") it when:
    1) it is explicitly flushed
    2) the buffer overflow
    3) an jsp include is invoked
    My code is in a layout.jsp file which is referenced in a tiles-definition. The tiles definition is tiles:inserted in a top-level jsp file. I am not sure if tiles uses jsp:include or if there is a way to get jsp:foward to work in the layout.jsp.

  • Servlet failed with Exception java.lang.IllegalStateException: Response already committed

    Hi,
    can someone help with this issue. I've been getting this error in my logs since for the past 3 days and I don't know how to resolve it.
    os-aix-64 bit
    wls:10.3
    ####<Aug 25, 2014 11:36:18 AM GMT+05:30> <Error> <HTTP> <XXX-XXXXXX-XX> <examplesServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1408946778196> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@2ee12ee1 - appName: 'consoleapp', name: 'console', context-path: '/console', spec-version: '2.5'] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
            at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1553)
            at weblogic.servlet.internal.ServletResponseImpl.sendRedirect(ServletResponseImpl.java:838)
            at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136)
            at com.bea.netuix.nf.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:50)
            at com.bea.netuix.servlets.controls.content.NetuiContent.handleRedirect(NetuiContent.java:234)
            at com.bea.netuix.servlets.controls.content.NetuiContent.handlePreRenderResponseState(NetuiContent.java:630)
            at com.bea.netuix.servlets.controls.content.StrutsContent.handlePreRenderResponseState(StrutsContent.java:224)
            at com.bea.netuix.servlets.controls.content.NetuiContent.preRender(NetuiContent.java:310)
            at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:428)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:727)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
            at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:146)
            at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
            at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
            at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
            at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162)
            at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
            at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
            at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:211)
            at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:196)
            at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:54)
            at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(Unknown Source)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
            at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    TIA,
    Vamsi

    Can someone please help me with this issue.

  • WAS 6.0 - Response already committed / OutputStream already obtained

    Hello, we have struts code that is working fine in websphere 5, but not 6. I've seen this same kind of thing being post around, but haven't found one that closely resembles our simple setup. Below I've copied what our code looks like. Please help me to understand what the least-intrusive way would be to fix something simple like this, and let me know if more info is needed. FYI, we have tried returning null from the class, but this doens't seem to work. Also, some additional info is that we need this to work in WAS 5 and 6, because we have two different apps containing the same code, one of which is deployed (via EAR file) on 5 and the other 6. Thanks!
    struts-config entry:     
    <action path="/streamFile" type="MyClass" scope="request" validate="false">
                  <forward name="success" path=""/>
    </action>     
    web.xml entry:
         <servlet-mapping>
              <servlet-name>opsconsoleServlet</servlet-name>
              <url-pattern>streamFile</url-pattern>
         </servlet-mapping>
    Snippet of Class file:
    public class MyClass extends Action {
         public ActionForward execute(ActionMapping mapping,
                         ActionForm form,
                        HttpServletRequest request,
                        HttpServletResponse response)
              throws Exception {    
         ServletOutputStream out = response.getOutputStream();
         BufferedOutputStream bos = null;
         try {
                   bos = new BufferedOutputStream(out);
                    bos.write(<bytes, etc>);
         } catch(final MalformedURLException e) {
         throw e;
         } catch(final IOException e) {
         throw e;
         } finally {
         if (bos != null)
              bos.close();
         if (out != null)
              out.close();
         return mapping.findForward("success");
    error from log:
    [11/5/07 12:50:11:737 EST] 00000036 ServletWrappe E   SRVE0014E: Uncaught service() exception root cause FilterProxyServlet: Cannot forward. Response already committed.
    [11/5/07 12:50:12:001 EST] 00000036 ServletWrappe E   SRVE0068E: Could not invoke the service() method on servlet opsconsoleServlet. Exception thrown : javax.servlet.ServletException: Cannot forward. Response already committed.
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:157)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
    error later in log:
    [11/5/07 12:50:12:621 EST] 00000036 SRTServletRes W   WARNING: Cannot set status. Response already committed.
    [11/5/07 12:50:12:627 EST] 00000036 SRTServletRes W   WARNING: Cannot set header. Response already committed.
    [11/5/07 12:50:14:191 EST] 00000036 ServletWrappe A   SRVE0242I: [Communication] [/OpsConsole] [/WEB-INF/jsp/error/internalError.jsp]: Initialization successful.
    [11/5/07 12:50:14:201 EST] 00000036 ServletWrappe E   SRVE0068E: Could not invoke the service() method on servlet /WEB-INF/jsp/error/internalError.jsp. Exception thrown : java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
            at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:490)
            at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170)
            at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:163)
            at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:227)

    svguerin3 :
    So this is something that worked in websphere 5 but not 6.. Are you sure this same code working on WAS5? This shouldn't. I guess you are trying to display the contents of the stream in a JSP page.If that's correct don't use
    ServletOutputStream out = response.getOutputStream();
         BufferedOutputStream bos = null;
         try {
                   bos = new BufferedOutputStream(out);
                    bos.write(<bytes, etc>);
         }instead read the bytes in to an in memory object, add this in memory object to request param and then call findForward(). In the JSP page get this request attribute and do whatever you want.
    Note: You can either use servletoutstream.write or RequestDispactcher.forward/redirect/response.sendRedirect.

  • When Clicking a particular Product - java.lang.IllegalStateException: Response already committed

    Hi,
    Can anyone please help me out on the below exception. When am clicking a particular product am getting below exception
    java.lang.IllegalStateException: Response already committed
        at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1629)
        at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:637)
        at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:602)
        at atg.servlet.ContextRootSwappingInterceptor.interceptRequest(ContextRootSwappingInterceptor.java:366)
        at atg.servlet.pipeline.TailPipelineServlet.service(TailPipelineServlet.java:168)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:275)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.endeca.assembler.AssemblerPipelineServlet.service(AssemblerPipelineServlet.java:458)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.http.CookieBufferServlet.service(CookieBufferServlet.java:119)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.ExpiredPasswordServlet.service(ExpiredPasswordServlet.java:383)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.MimeTyperPipelineServlet.service(MimeTyperPipelineServlet.java:228)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:696)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.commerce.order.CommerceCommandServlet.service(CommerceCommandServlet.java:150)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.commerce.promotion.PromotionServlet.service(PromotionServlet.java:213)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.AccessControlServlet.service(AccessControlServlet.java:696)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.sessionsaver.SessionSaverServlet.service(SessionSaverServlet.java:2452)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.PageEventTriggerPipelineServlet.service(PageEventTriggerPipelineServlet.java:191)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.search.servlet.SearchClickThroughServlet.service(SearchClickThroughServlet.java:418)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.multisite.SiteSessionEventTriggerPipelineServlet.service(SiteSessionEventTriggerPipelineServlet.java:161)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.SessionEventTrigger.service(SessionEventTrigger.java:512)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.ProfilePropertyServlet.service(ProfilePropertyServlet.java:230)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.ProfileRequestServlet.service(ProfileRequestServlet.java:461)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.projects.store.servlet.pipeline.ProtocolSwitchServlet.service(ProtocolSwitchServlet.java:309)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:491)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.URLArgumentPipelineServlet.service(URLArgumentPipelineServlet.java:298)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.PathAuthenticationPipelineServlet.service(PathAuthenticationPipelineServlet.java:392)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.security.ThreadUserBinderServlet.service(ThreadUserBinderServlet.java:113)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:234)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.SecurityServlet.service(SecurityServlet.java:196)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.multisite.SiteContextPipelineServlet.service(SiteContextPipelineServlet.java:515)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1252)
        at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:930)
        at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:272)
        at atg.filter.dspjsp.PageFilter.innerDoFilter(PageFilter.java:348)
        at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:206)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    >
    Regards
    333

    Usually this error comes if you try to do a forward or redirect when response is already committed i.e. when something has already been sent back to the client browser you can't do a redirect.
    Sometimes this can happen when there is another error in your application which triggers the application server to redirect to the error page (if you cave configured one) but the response might already have been committed. Try to enable loggingDebug on /atg/dynamo/servlet/dafpipeline/VirtualContextRootInterceptor and see if you can get more information about any possible error in the logs.

  • Response Already commited exception while displaying Image outside WAR File

    My application contains a JSF page, which is bound to a Spring bean. The UI components state of the JSF page is provided by the Spring bean properties (This means the Spring bean is the backing bean of the JSF page) . My problem is the JSF page also contains a graphicImage meant to display image stored outside the WAR file.
    I tried using the ImageServlet that streams the image to the HttpServletResponse as suggested in:
    http://balusc.blogspot.com/2007/04/imageservlet.html However, I receive a Response Already commited exception. I guess this is because the Faces servlet has already sent back a response based on the other UI component values and the ImageServlet is then trying to repeat that. Please suggest how to handle this

    First thanks for your prompt reply but I am still stuck. Let me get into details. My JSF page is:
    <f:view>
      <h:form id="MyForm" >
        <h:graphicImage value="image?file=#{springDaoRef.imageName}&url=#{springDaoRef.imageUrl}"  width="100" 
           height="100"/>
       Category: <h:outputText value="#{springDaoRef.categoryName}"/>
       Image Title: <h:outputText value="#{springDaoRef.imageTitle}"/>
      </h:form>
    </f:view>The ImageServlet is receiving the file and url parameter values and reading quite fine from the image present in the file system. The problem occurs at the following statement in ImageServlet:
    output = new BufferedOutputStream(response.getOutputStream());Im using Glassfish and it reports the following stack:
    ApplicationDispatcher[/OnlinePhotoSharingApp_1] PWC1231: Servlet.service() for servlet ImageServlet threw exception
    java.lang.NullPointerException
            at net.time2know.classes.ImageServlet.processRequest(ImageServlet.java:106)
            at net.time2know.classes.ImageServlet.doGet(ImageServlet.java:123)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
            at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@f801ef) threw exceptionI am assuming that the image request is going through the FacesServlet. But now my question is how to inform JSF that the response is complete (via FacesContext.responseComplete()) which will enable the ImageServlet to send the image response?

  • Any one to help?java.lang.IllegalStateException: Response already committed

    Hi everyone , I just need someone to help me fix this problem, can anyone help me ? Thanks very munch.
    When the domain start up , the following error occurs:
    <Nov 20, 2009 3:03:36 PM CST> <Error> <HTTP> <UAP> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1258700616188> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@198801f - appName: 'consoleapp', name: 'console', context-path: '/console', spec-version: '2.5'] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
    at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1553)
    at weblogic.servlet.internal.ServletResponseImpl.sendRedirect(ServletResponseImpl.java:838)
    at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136)
    at com.bea.netuix.nf.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:50)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handleRedirect(NetuiContent.java:234)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handlePreRenderResponseState(NetuiContent.java:630)
    at com.bea.netuix.servlets.controls.content.StrutsContent.handlePreRenderResponseState(StrutsContent.java:224)
    at com.bea.netuix.servlets.controls.content.NetuiContent.preRender(NetuiContent.java:310)
    at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:428)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:727)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:146)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
    at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:211)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:196)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:54)
    at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    Edited by: user1995641 on 2009-11-20 上午7:33

    Hi
    the other user means to say that : what is the version of jdk used. Did the jdk come with the weblogic server 10.3 or you refered to a different jdk in the system it self.

  • Java.lang.IllegalStateException: Cannot forward. Response already committed

    i have deployed my application on Websphere application server 5.0. most of the time my jsp page works properly with any exception, but somtime it give me expeception and display page uncompletely rendered.
    Follwoing exception occure on particual page with particular record and same page works correctly with other reocrds....
    java.lang.IllegalStateException: Cannot forward. Response already committed. (Servlet 2.3, SRV 8.4)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:160)
         at com.mcb.cpms.presentation.controllers.CPMSController.dispatchRequest(CPMSController.java:918)
         at com.mcb.cpms.presentation.controllers.CPMSController.doGet(CPMSController.java:1278)
         at com.mcb.cpms.presentation.controllers.CPMSController.doPost(CPMSController.java:1308)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    i will be thankfull if any one have any idea about it.....
    waiting for your immediate response

    Hi Junaid,
    Your code can be work correctly on different servers or with other records but it can not be handled with buffer or autoflush,
    I had same problem a few weeks ago. And lastly I had to control before printing any output. My application was working on WebSphere but not on Tomcat, so it is general problem.
    The only way if you have to put some output before sending redirect:
    When you want to redirect the page, write window.location = ... (javascript code).
    When page is loaded automatically will be redirected to the page you want. But of course it is a bit slow.
    Good Luck,
    isturk.

  • Java.lang.IllegalStateException: Response already committed

    Any one can help?
    <Nov 20, 2009 3:03:36 PM CST> <Error> <HTTP> <UAP> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1258700616188> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@198801f - appName: 'consoleapp', name: 'console', context-path: '/console', spec-version: '2.5'] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
    at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1553)
    at weblogic.servlet.internal.ServletResponseImpl.sendRedirect(ServletResponseImpl.java:838)
    at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:136)
    at com.bea.netuix.nf.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:50)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handleRedirect(NetuiContent.java:234)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handlePreRenderResponseState(NetuiContent.java:630)
    at com.bea.netuix.servlets.controls.content.StrutsContent.handlePreRenderResponseState(StrutsContent.java:224)
    at com.bea.netuix.servlets.controls.content.NetuiContent.preRender(NetuiContent.java:310)
    at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:428)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:727)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:146)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
    at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:211)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:196)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:54)
    at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >

    check this thread...
    Re: response.sendRedirect() doesnt work

  • CatalogDeployer issue - "Cannot set header. Response already committed"

    Whenever we are trying to deploy any package we immediately get a 'deployment successful' message though the package is not deployed and remnains in the received for deployment queue. This is only found in the log 00000048 SRTServletRes W WARNING: Cannot set header. Response already committed.
    Very much appreciated if you could provide the resolution.
    We have a production service release tomorrow so we need assistance on this one asap. Thanks a lot

    You can not write to the response after you have forwarded the request to another servlet/JSP.

  • Response already commited error. Please help very urgent

    Hello,
    I am getting "RESPONSE HAS ALREADY BEEN COMMITED" error, when I open a report.
    Please explain why do the get this error and how can I prevent it from coming.
    Thanks in advance.
    Raghu

    Can't really give much more than general guidelines as you haven't provided that much information.
    A stack trace indicating what caused the "response already commited" error would be useful in diagnosis...
    HTTP is one request, one response.
    You get a request, you can only send one response to it.
    When dealing with a JSP your response html text gets written to a buffer, and then to the output stream.
    You can change your response output any time until the output is committed.
    The response gets committed if
    - the buffer fills up with data. The default size of the buffer on a JSP page is 8kb If more than 8kb of data is written, then it will commit the response. You can change the size of the buffer with the [<%@ page %> directive|http://java.sun.com/products/jsp/syntax/2.0/syntaxref2010.html#15653]
    - you flush the output buffer manually
    What sort of things cause the buffer to be cleared and reset? Anything that changes your response completely.
    The obvious causes:
    - a jsp:forward
    - a response.sendRedirect
    - an exception that tries to load the error page.
    How to prevent it?
    1 - if you are going to forward or redirect from a jsp page do it as early as possible in the page to prevent the buffer filling up.
    2 - just because you issued a <jsp:forward> doesn't necessarily mean the page has stopped executing. Put it in an if/else block or similar so that after it does the forward/redirect it doesn't keep executing that same page.

  • Cannot login: Response already committed

    Getting this problem of "Cannot login: Response already committed " for
    /etc/designs/geometrixx/static.css .
    Has anyone faced the same kind of problem. When do we typically get it ?

    Jsp normally buffers output in a 8k buffer and write it to the output stream (i.e. "commits") it when:
    1) it is explicitly flushed
    2) the buffer overflow
    3) an jsp include is invoked
    My code is in a layout.jsp file which is referenced in a tiles-definition. The tiles definition is tiles:inserted in a top-level jsp file. I am not sure if tiles uses jsp:include or if there is a way to get jsp:foward to work in the layout.jsp.

  • Error: java.lang.IllegalStateException: response already Commited

    I have two JSP ie Page1 and Page2.
    Page2 has some JSP:include
    I include page2 in Page1 using JSP:Include.
    When set flush=true the Page2 is included
    if i set flush=false then i get "Error: java.lang.IllegalStateException: response already committed"
    Pls help
    Thanks in advance

    No, a committed response means data (including the response header) has possibly and very probably been sent to the client. If you need to do a redirect, you should be doing it before generating any output.

Maybe you are looking for