Project

General

Profile

Bug #4676

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

Added by Seba Pereyro over 6 years ago. Updated over 6 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01/19/2016
Due date:
% Done:

0%

Estimated time:

Description

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: java.io.NotSerializableException: eu.webtoolkit.jwt.WtServlet$BoundSession

[INFO] at com.google.appengine.tools.development.SerializableObjectsOnlyHashSessionManager$SerializableObjectsOnlyHttpSession.checkCanSerialize(SerializableObjectsOnlyHashSessionManager.java:66)

[INFO] at com.google.appengine.tools.development.SerializableObjectsOnlyHashSessionManager$SerializableObjectsOnlyHttpSession.setAttribute(SerializableObjectsOnlyHashSessionManager.java:43)

[INFO] at eu.webtoolkit.jwt.WtServlet.doHandleRequest(WtServlet.java:361)

[INFO] at eu.webtoolkit.jwt.ServletApi.handleRequest(ServletApi.java:27)

[INFO] at eu.webtoolkit.jwt.ServletApi25.doHandleRequest(ServletApi25.java:36)

[INFO] at eu.webtoolkit.jwt.WtServlet.handleRequest(WtServlet.java:256)

[INFO] at eu.webtoolkit.jwt.WtServlet.doGet(WtServlet.java:264)

[INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)

[INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

#1

Updated by Seba Pereyro over 6 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.

#2

Updated by Koen Deforche over 6 years ago

  • Status changed from New to Feedback

Hey,

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.

Koen

#3

Updated by Seba Pereyro over 6 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.

#4

Updated by Koen Deforche over 6 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