2015-09-25 41 views
1

我的Web應用程序使用Weblogic 10.3.6,Javaee 5和LDAP驗證。 認證成功後,我的過濾器嘗試執行chain.doFilter(request, response); 並拋出該異常java.lang.IllegalStateException:無法調整緩衝區大小 - 已經寫入315字節(Servlet 2.3,sec。5.1)

####<Sep 25, 2015 11:34:54 AM BRT> <Error> <HTTP> <viniciusbrito-Vostro-230> <AdminServer> <[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1443191694402> <BEA-101020> <[[email protected][app:frente-loja-web module:frente-loja-web.war path:/frente-loja-web spec-version:2.5]] Servlet failed with Exception 
java.lang.IllegalStateException: Cannot resize buffer - 315 bytes have already been written (Servlet 2.3, sec. 5.1) 
    at weblogic.servlet.internal.ServletResponseImpl.setBufferSize(ServletResponseImpl.java:357) 
    at weblogic.servlet.jsp.PageContextImpl.initialize(PageContextImpl.java:74) 
    at weblogic.servlet.jsp.PageContextImpl.<init>(PageContextImpl.java:110) 
    at weblogic.servlet.jsp.JspFactoryImpl.getPageContext(JspFactoryImpl.java:40) 
    at jsp_servlet.__index._jspService(__index.java:60) 
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) 
    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:56) 
    at br.com.pernambucanas.painelnfecomun.web.util.AutenticacaoFilter.doFilter(AutenticacaoFilter.java:48) 
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) 
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) 
    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) 
> 

但是我的應用程序繼續工作。

+0

嗨,羊,你解決了嗎?如果是這樣,怎麼樣?謝謝 – user648026

+0

沒有我的兄弟=( –

回答

1

如果不知道更多,我不能給你明確的答案。

但底線是,在調用setBufferSize之前,正在寫入響應緩衝區。您需要確定它是什麼並反轉該邏輯。爲了澄清,如果你的認證代碼寫了一些東西作爲響應,比如重定向/轉發,然後你在之後調用了chain.doFilter(request,response),你將會得到這個錯誤,因爲doFilter正在調用在你已經寫了一些響應之後setBufferSize。