Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.IllegalStateException

 
hari gutta
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic