0

Session stack overflow

asked 2012-02-03 12:24:03 +0800

afxgroup gravatar image afxgroup
126 1

Hi,
i have a strange problem with zk and this line:

arg0.setAttribute("SKIN", currentSkin);

this line is called from:

public class SessionManager implements org.zkoss.zk.ui.util.SessionInit{
public void init(Session arg0, Object arg1) throws Exception {

and it seems call a new session every time and so it cause a stack overflow..

i did'nt see this in the past. Actually i'm using zk 5.0.9 anyone?

i've cut a lot of text.. but you should see that my line
at com.wsm.framework.SessionManager.init(SessionManager.java:33)

cause the problem

Caused by: java.lang.StackOverflowError
	at org.zkoss.zk.ui.http.WebManager.getWebManager(WebManager.java:335)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:402)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)

[.....]

	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:57)
	at org.zkoss.zk.ui.Sessions.getCurrent(Sessions.java:45)
	at org.zkoss.zk.ui.http.HttpSessionListener23.attributeReplaced(HttpSessionListener23.java:72)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1510)
	at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1414)
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:156)
	at org.zkoss.zk.ui.http.SimpleSession.setAttr(SimpleSession.java:293)
	at org.zkoss.zk.ui.http.SimpleSession.setAttribute(SimpleSession.java:233)
	at com.wsm.framework.SessionManager.init(SessionManager.java:33)
	at org.zkoss.zk.ui.util.Configuration.invokeSessionInits(Configuration.java:772)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:154)
	at org.zkoss.zk.ui.http.SimpleSession.<init>(SimpleSession.java:112)
	at org.zkoss.zk.ui.http.SimpleUiFactory.newSession(SimpleUiFactory.java:35)
	at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:150)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:404)
	at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:398)
	at org.zkoss.zk.ui.http.SessionResolverImpl.getSession(SessionResolverImpl.java:37)

delete flag offensive retag edit

5 Replies

Sort by » oldest newest

answered 2012-02-06 08:24:20 +0800

cvarona gravatar image cvarona
554 1 6

updated 2012-02-06 08:25:52 +0800

It also happened to me; I couldn't find out why, but I was able to manage it with the following (obvious) scheme:

public void init( Session sess, Object request ) throws Exception {
        if( sess.hasAttribute( ALREADY_INITIALIZED ) ) {
            return;
        }

        sess.setAttribute( ALREADY_INITIALIZED, Boolean.TRUE );
        ...
}

With kind regards

César Varona

link publish delete flag offensive edit

answered 2012-02-06 09:43:18 +0800

gekkio gravatar image gekkio flag of Finland
899 1
http://gekkio.fi/blog

I've seen this too with 5.0.9 and fixed it similarly as César.
It's probably a pretty new ZK bug because my code worked with older versions correctly.

link publish delete flag offensive edit

answered 2012-02-07 10:32:18 +0800

benbai gravatar image benbai
2228 6
http://www.zkoss.org

Hi,

Could you kindly provide a sample that can reproduce this issue and post a bug on bug tracker?

Thanks,
ben

link publish delete flag offensive edit

answered 2013-02-26 10:51:36 +0800

gediminas gravatar image gediminas
39 3

We had a similar problem, and the solution we chose was simply to extend org.zkoss.zk.ui.http.HttpSessionListener like this:

public class HttpSessionListenerEx extends HttpSessionListener {

    @Override
    public void attributeAdded(HttpSessionBindingEvent evt) {
        if (!shallIgnore(evt.getName())) {
            super.attributeAdded(evt);
        }
    }

    private boolean shallIgnore(String name) {
        // ignore javamelody session activation attributeAdded event if current session is not known
        return Sessions.getCurrent(false) == null && "javamelody.sessionActivation".equals(name);
    }
}

"javamelody.sessionActivation" here being name of the session attribute in question

link publish delete flag offensive edit

answered 2014-03-19 09:04:24 +0800

mahdiiran gravatar image mahdiiran
40 3

very thanks HttpSessionListenerEx solve my problem

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-02-03 12:24:03 +0800

Seen: 480 times

Last updated: Mar 19 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More