Bug #4676

eu.webtoolkit.jwt.WtServlet$BoundSession throwing not serializable error when running on appengine.

Added by Seba Pereyro almost 7 years ago. Updated almost 7 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


I am trying to use JWt and want to run it on google app engine. It seems the AppEngine sandbox checks

[INFO] 5136 [593102911@qtp-1528709932-0] INFO eu.webtoolkit.jwt.WtServlet - Session created: ew5ps0e1n985 (#sessions = 1)

[INFO] java.lang.RuntimeException: eu.webtoolkit.jwt.WtServlet$BoundSession

[INFO] at$SerializableObjectsOnlyHttpSession.checkCanSerialize(

[INFO] at$SerializableObjectsOnlyHttpSession.setAttribute(

[INFO] at eu.webtoolkit.jwt.WtServlet.doHandleRequest(

[INFO] at eu.webtoolkit.jwt.ServletApi.handleRequest(

[INFO] at eu.webtoolkit.jwt.ServletApi25.doHandleRequest(

[INFO] at eu.webtoolkit.jwt.WtServlet.handleRequest(

[INFO] at eu.webtoolkit.jwt.WtServlet.doGet(

[INFO] at javax.servlet.http.HttpServlet.service(

[INFO] at javax.servlet.http.HttpServlet.service(


Updated by Seba Pereyro almost 7 years ago

here is the ful description:

I am trying to use JWt(3.3.5) and want to run it on google app engine. It seems the AppEngine sandbox checks whether the object to be serialized in the session is serializable, if not throws the exception.


Updated by Koen Deforche almost 7 years ago

  • Status changed from New to Feedback


JWt and google app engine do not mix well indeed. JWt keeps an entire widget tree in memory, together with any other data you choose, but Google App Engine assumes that the only state your application will keep (throughout a session) sits in a database.

We experimented with it in the past, but only managed to get it working partially with really bad performance.



Updated by Seba Pereyro almost 7 years ago

I forked it and made it work. Needed to add the Serializable marker class to all the classes that are serialized in the session. I got it working, but yes, google app engine, when is configured for autoscaling, it is not very forgiving in terms of where the data should be stored. if you are running on backend instances you can simulate more standard configs. For auto-scaling you can use a caching layers (local-memory caches like guava cache -> memcache -> datastore) mechanism so you do not need to go to the storage all the time and that improves the performance.

I really like what you are doing. Congratulations for what you have achieved so far.


Updated by Koen Deforche almost 7 years ago

Hey, I didn't know that they have other configurations that avoid some or all of the performance issues. Are you considering it for a production deployment?

Also available in: Atom PDF