将项目部署到 Google App Engine 时出错
我在尝试部署项目时遇到问题: “发现一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无需上传 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.
您可以尝试手动拆分appengine-api-1.0-sdk-1.5.3.jar。
You can try to split appengine-api-1.0-sdk-1.5.3.jar manually.