AppEngine下的RPC序列化策略文件

发布于 2024-12-11 05:49:18 字数 711 浏览 0 评论 0原文

GWT / AppEngine RPC 接口正在困扰着我!我收到如下错误:

INFO:javax.servlet.ServletContext log:UserService:ERROR:未找到序列化策略文件“/55585D0849A4549E3FCE91B33725B02F.gwt.rpc”;您是否忘记将其包含在此部署中?

每次我启动 Devserver 时。我已在 appengine-web.xml 中正确设置了 public-root(除了 .gwt.rpc 之外,应用程序的其余部分均正常运行) > 文件)。

  <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>

我做错了什么?请帮忙!

The GWT / AppEngine RPC interface is eating at me! I get errors such as 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 start the Devserver. I have correctly set the public-root 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 please!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

oО清风挽发oО 2024-12-18 05:49:18

经过一番实验后,我得出以下结论:

  • 不要忘记将 .rpc 文件包含在 appengine 部署(appengine-web.xml 文件)中,并注意缓存问题! (例如序列化策略的更改)
  • 最好不要在 appengine-web.xml 中使用 public-root 标记:删除 welcome 文件(例如索引.html) 位于 war 目录的 / 中,并对 GWT 进行适当的更改以查找其文件
  • 更新 servlet url-pattern标签指向 GWT 生成的目录内war 目录

  • 对于关联的 servlet对于tasks(即web hooks),不要更改

因此,唯一需要了解 GWT 生成文件夹的地方位于 web.xml 中。当然,GWT项目的welcome-file也必须进行改编。

希望这对某人有帮助

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

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

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

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

Hope this helps somebody

日久见人心 2024-12-18 05:49:18

我在部署的 GAE 服务器上遇到了同样的问题,直到我为资源文件部分添加了 rpc include 后,错误才消失。这就是我最终得到的结果:

<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>

I had the same problem on the deployed GAE server and it wasn't until I added the rpc include for the resource-files section that the error went away. Here's 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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文