Saturday, January 26, 2008

ZK: Non-serializable attribute error on StandardSession

I got this one while starting up Tomcat and struggled with it for probably two days. The stack trace looks something like this:

SEVERE: Servlet.service() for servlet zkLoader threw exception
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1293)
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1254)
at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
at org.zkoss.zk.ui.http.WebManager.newSession(WebManager.java:308)
at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:320)
at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:287)


The problem was a tag in my web.xml. I must have clicked it on in IDEA's graphical view of the web.xml. Just remove the tag and you're good to go.

3 comments:

dTmdT said...

Hello Andre,

could you please tell us, wich tag you had to remove? we have the same problem and it would be nice to check if we made the same mistake with our idea!

thx

Andre van der Schyff said...

Hmmm, yes, it's not very bright of me not to include the tag... I can't remember what exactly it was as it was something very odd that I haven't seen in a web.xml before, but I think that IDEA put it right at the top of the XML file, right after the web-app tag.

Anonymous said...

it is the distributable Tag