Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

java.lang.IllegalStateException

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey I am getting the below exception when running my huge application :

java.lang.IllegalStateException: Cannot resize buffer - 319 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:62)
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.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:327)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:428)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at gov.hud.tool.web.controller.ServletFilter.doFilter(ServletFilter.java:108)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at gov.hud.tool.web.controller.LoginFilter.doFilter(LoginFilter.java:109)
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)
>

All I can figure out from this exception is, the error is caused from index.jsp.

But my code works this way :

web.xml -> index.jsp [ <META HTTP-EQUIV="Refresh" CONTENT="0;URL=index.action">] -> calls index.action mapping from ind-serv.xml (which is included in struts.xml) -> Action mapping calls another class, and passes arguments to this class, using <param> in action mapping.

So it is kinda hard to debug, since all classes are interrelated.

Any idea guys, why this error is occuring?
 
hari gutta
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may be helpful :

From Servlet 2.3, sec 5.1
Servlets can do buffering to the clients for efficiency purpose, for which servlet request the size for buffering by using setBufferSize(). But this must happen before any content is written using Writer or ServletOutputStream or it results in IllegalStateException
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!