gpt4 book ai didi

java.lang.IllegalStateException : Cannot resize buffer - 315 bytes have already been written (Servlet 2. 3,秒。 5.1)

转载 作者:行者123 更新时间:2023-11-30 07:55:06 24 4
gpt4 key购买 nike

我的 Web 应用程序使用 Weblogic 10.3.6、Javaee 5 和 LDAP 身份验证。身份验证成功后,我的过滤器尝试执行 chain.doFilter(request, response);并抛出此异常

    ####<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> <[ServletContext@1836230698[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)
>

但是我的应用程序继续有效。

最佳答案

在不了解更多信息的情况下,我无法给您明确的答案。

但底线是,在调用 setBufferSize 之前,有东西正在写入响应缓冲区。您需要确定它是什么并反转该逻辑。

只是澄清一下,如果您的身份验证代码正在编写某些内容作为响应,例如重定向/转发,并且您在此之后调用 chain.doFilter(request, response) ,您将收到该错误,因为 doFilter 正在调用 setBufferSize在您已经写了一些回复之后。

关于java.lang.IllegalStateException : Cannot resize buffer - 315 bytes have already been written (Servlet 2. 3,秒。 5.1),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32784777/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com