RPC Serialization Policy File in AppEngine

The RPC GWT / AppEngine interface is powered by me! I get errors like this:

INFO: javax.servlet.ServletContext log: UserService: ERROR: The serialization policy file '/55585D0849A4549E3FCE91B33725B02F.gwt.rpc' was not found; did you forget to include it in this deployment?

every time I run Devserver. I set public-root correctly in appengine-web.xml (the rest of the application is served OK, except for the .gwt.rpc files).

  <static-files> <include path="**" /> <include path="**.nocache.*" expiration="0s" /> <include path="**.rpc" expiration="0s" /> <include path="**.cache.*" expiration="365d" /> </static-files> <resource-files> <include path="**.gwt.rpc" /> </resource-files> 

What am I doing wrong? Help me please!

+4
source share
2 answers

After some experimentation, here is what I came up with:

  • Remember to list the .rpc files included in the appengine deployment ( appengine-web.xml ) and beware of caching issues! (e.g. changes to serialization policy)
  • It’s better not to use the public-root tag in appengine-web.xml : drop the welcome file (e.g. index.html) in the war directory / and make the appropriate changes for the GWT to find its files
  • Update url-pattern servlet tags to point inside the generated GWT directory inside the war directory

  • For servlets associated with tasks (i.e. web hooks ), do not change url-pattern

Therefore, the only place that requires some knowledge of the generated GWT folder is in web.xml . Of course, the welcome-file project of the GWT project must also be adapted.

Hope this helps someone.

+4
source

I had the same problem on a deployed GAE server, and only after I added the rpc section for the file resource section did the error disappear. Here is what I ended up with:

 <resource-files> <include path="/resources/**" /> <include path="**.gwt.rpc"/> </resource-files> <static-files> <include path="**" /> <include path="**.nocache.*" expiration="0s" /> <include path="**.cache.*" expiration="365d" /> <exclude path="**.gwt.rpc"/> </static-files> 
+3
source

All Articles