将项目部署到 Google App Engine 时出错

发布于 2024-12-03 12:20:06 字数 1603 浏览 2 评论 0原文

我在尝试部署项目时遇到问题: “发现一个 jar 文件太大而无法上传”。当脚本尝试上传时出现问题 appengine-api-1.0-sdk-1.5.3.jar(15.8 MB,但仅允许 10MB 文件)。 这个问题自 2009 年以来就广为人知。谷歌问题跟踪器和这里也有很多票证。网络上有很多此类消息。但他们都指的是两种解决方案:

1)使用--enable_jar_splitting。当然我已经尝试过使用它。没有成功:

# appengine-java-sdk-1.5.3/bin/appcfg.sh -e [email protected] --enable_jar_splitting update    project/war
Reading application configuration data...
......
java.lang.IllegalStateException: Found a jar file too large to upload:     "/tmp/appcfg4869648953084473935.tmp/WEB-INF/classes/war/WEB-INF/lib/appengine-api-1.0-sdk-    1.5.3.jar". Consider using --enable_jar_splitting.
Unable to update app: Found a jar file too large to upload:     "/tmp/appcfg4869648953084473935.tmp/WEB-INF/classes/war/WEB-INF/lib/appengine-api-1.0-sdk- 1.5.3.jar". Consider using --enable_jar_splitting.
Please see the logs [/tmp/appcfg5857347513630341491.log] for further information.

我尝试使用不同版本的SDK(1.4.3、1.5.2和最新的1.5.3)。但该脚本忽略了 --enable_jar_splitting 选项。

2) 将appengine-api-1.0-sdk-1.5.3.jar解压到WEB-INF/lib。在这种情况下会出现另一个错误。项目仅限 3000 个文件。大约有 3500 个文件。在 appengine-api-1.0-sdk-1.5.3.jar 存档和我的项目中的 100 个文件中。因此,该解决方案效果不佳。

3)我自己找到了3d解决方案。您可以从 WEB-INF/lib 目录中删除 appengine-api-1.0-sdk-1.5.3.jar。它有效,但仅适用于您有简单项目的情况。但如果项目使用了 google appengine 的所有功能,它就不起作用。我需要使用数据存储和其他一些功能。如果没有 appengine-api-1.0-sdk-1.5.3.jar,该项目可以部署,但它无法工作并在 google 错误控制台中产生错误(缺少类)。

我已经给谷歌发了一条消息。不幸的是,他们保持沉默。

请帮助我,你们这些聪明的家伙。我将非常感激。希望有一个小技巧可以让它发挥作用。

I have a problem trying to deploy my project:
«Found a jar file too large to upload». The problem occurs when the script tries to upload
appengine-api-1.0-sdk-1.5.3.jar (15.8 MB although only 10MB files are allowed).
The problem is well-known since 2009. There are a lot of tickets in google issue tracker and here as well. There are a lot of messages of this kind all over the web. But all of them are referring to the two solutions:

1) Using the --enable_jar_splitting. Surely I've tried to use it. No success:

# appengine-java-sdk-1.5.3/bin/appcfg.sh -e [email protected] --enable_jar_splitting update    project/war
Reading application configuration data...
......
java.lang.IllegalStateException: Found a jar file too large to upload:     "/tmp/appcfg4869648953084473935.tmp/WEB-INF/classes/war/WEB-INF/lib/appengine-api-1.0-sdk-    1.5.3.jar". Consider using --enable_jar_splitting.
Unable to update app: Found a jar file too large to upload:     "/tmp/appcfg4869648953084473935.tmp/WEB-INF/classes/war/WEB-INF/lib/appengine-api-1.0-sdk- 1.5.3.jar". Consider using --enable_jar_splitting.
Please see the logs [/tmp/appcfg5857347513630341491.log] for further information.

I tried to use different versions of SDK (1.4.3, 1.5.2 and the latest 1.5.3). But the script ignores the --enable_jar_splitting option.

2) Unpack appengine-api-1.0-sdk-1.5.3.jar to WEB-INF/lib. Another error arises in this case. Projects are limited by 3000 files. There are 3500 files approx. in appengine-api-1.0-sdk-1.5.3.jar archive and 100 files in my project. So, this solution does not work as well.

3) I have found the 3d solution myself. You can delete the appengine-api-1.0-sdk-1.5.3.jar from WEB-INF/lib directory. It works but only in cases you're having simple projects. But it does not work in case of projects using all the power of google appengine. I need to use datastore and some other functions. Without the appengine-api-1.0-sdk-1.5.3.jar the project could be deployed, but it does not work and produces errors in google error console (classes are missing).

I have sent a message to google. They're keeping silence, unfortunately.

Please help me, you clever guys. I will be awfully grateful. Hope, there is a little trick to get it work.

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

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

发布评论

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

评论(2

随风而去 2024-12-10 12:20:06

您无需上传 API jar - 它是 App Engine 平台的一部分。无论您更改的配置是什么导致 SDK 尝试上传它,您都应该更改回来。

You don't need to upload the API jar - it's part of the App Engine platform. Whatever configuration you've changed that is causing the SDK to try and upload it, you should change back.

っ左 2024-12-10 12:20:06

您可以尝试手动拆分appengine-api-1.0-sdk-1.5.3.jar。

  1. 解压 jar 文件。
  2. 将一半文件压缩到一个 jar 文件
  3. 将另一半文件压缩到一个 jar 文件。
  4. 更新您的类路径和构建工具。

You can try to split appengine-api-1.0-sdk-1.5.3.jar manually.

  1. Unzip the jar file.
  2. Zip half the files to one jar file
  3. Zip the other half to one jar file.
  4. Update your class path and build tools.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文