You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2003/01/07 16:49:56 UTC
DO NOT REPLY [Bug 15843] New: -
EmptyStackException in EnvironmentStack
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15843>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15843
EmptyStackException in EnvironmentStack
Summary: EmptyStackException in EnvironmentStack
Product: Cocoon 2
Version: 2.0.4
Platform: Other
OS/Version: Other
Status: NEW
Severity: Critical
Priority: Other
Component: core
AssignedTo: cocoon-dev@xml.apache.org
ReportedBy: amir@cti2.com
After calling a request that causes an exception, sometimes
EmptyStackException is thrown from the environment stack.
I traced this behavior, and found out that, the environment
stack is sometimes not initialized, when the request is
just starting to process, meaning, on the first call to
CocoonComponentManager#enterEnvironment, environmentStack.get()
returns an empty EnvironmentStack with offset = 1.
I think resetting the thread's EnvironmentStack on entry
(CocoonServlet#service) will solve this.
adding the following code in the beginning of CocoonServlet#service, seems to
patch this behavior:
EnvironmentStack es = CocoonComponentManager.getCurrentEnvironmentStack();
if (es != null) {
es.clear();
es.resetOffset(0);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org