I wrote a very simple application based on the example here.
When I try to run it with standalone Jetty 9.2.10.v20150310 (which is the same version used by GAE Managed VM) it works fine (loading and saving). When I try to run it with the Google Cloud SDK maven plugin or when I deploy it to App Engine, the spreadsheet content loads, but a CSS fails to download with an exception on the server:
[INFO] SEVERE: Failed to load media, /view/z_obs/lGAQ1/f14/0/ss_lGAQ1_t0_sheet_0.css
[INFO] java.lang.NullPointerException
[INFO] at org.zkoss.zss.ui.Spreadsheet.getMergeMatrixHelper(Spreadsheet.java:2755)
[INFO] at org.zkoss.zss.ui.Spreadsheet.prepareBasicStyleSheet(Spreadsheet.java:4144)
[INFO] at org.zkoss.zss.ui.Spreadsheet.getSheetDefaultRules0(Spreadsheet.java:4603)
[INFO] at org.zkoss.zss.ui.Spreadsheet.getSheetDefaultRules(Spreadsheet.java:4597)
[INFO] at org.zkoss.zss.ui.Spreadsheet.access$6200(Spreadsheet.java:219)
[INFO] at org.zkoss.zss.ui.Spreadsheet$ExtraCtrl.getMedia(Spreadsheet.java:3041)
[INFO] at org.zkoss.zk.au.http.AuDynaMediar.service(AuDynaMediar.java:128)
and then the UI gets slightly messed up - the cell selection highlight is not in the correct length of the cell, and attempting to type or format the content of cells fails. I tried all sorts of combinations - ZUL and JSP, setting the spreadsheet using the src attribute, bookProvider attribute ins JSP and from a SelectorComposer, and sometimes the CSS mentioned above is downloaded fine and there are no exceptions, or the exceptions appear later, but in all cases whenever I make changes to the cells, they are immediately reverted, or after attempting to type in one cell I am unable to type anything. From the logged exceptions I figure that the current book is somehow null during the operations, for example:
[INFO] java.lang.NullPointerException
[INFO] at org.zkoss.zss.ui.au.in.FetchActiveRangeCommand.process(FetchActiveRangeCommand.java:57)
and
[INFO] java.lang.NullPointerException
[INFO] at org.zkoss.zss.ui.au.in.AbstractCommand.getSheetUuid(AbstractCommand.java:37)
[INFO] at org.zkoss.zss.ui.au.in.CellFocusedCommand.process(CellFocusedCommand.java:55)
I followed the instructions here to make the application more GAE-friendly, though except the session serialization I don't think these settings are needed in managed VM, and they didn't make a difference.
From the fact that it works on the same version of standalong Jetty, I think it can be assumed that App Engine / Docker somehow causes this. I was able to run it locally with the old GAE SDK which uses a modified Jetty 6, but it doesn't simulate the production environment. I can't deploy to classic GAE because ZK Spreadsheet relies on java.awt.* classes.
I tried using the default Java runtime, and also tried to use custom runtimes based on gcr.io/google_appengine/jetty9 , gcr.io/google_appengine/java-compat and gcr.io/google_appengine/jetty9-compat - didn't seem to matter.
I suppose I could try third party Docker image based on standalone Jetty (or any application server) just to get the thing working, but I do need to access the datastore and blobstore.
Any help dealing with this would be appreciated.