This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes java.lang.IllegalStateException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "java.lang.IllegalStateException" Watch "java.lang.IllegalStateException" New topic
Author

java.lang.IllegalStateException

hari gutta
Ranch Hand

Joined: Mar 03, 2013
Posts: 33
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

Joined: Mar 03, 2013
Posts: 33
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
 
GeeCON Prague 2014
 
subject: java.lang.IllegalStateException