5

我有这个错误信息:

准备部署:在以下位置创建暂存目录:'C:\Users\leet\AppData\Local\Temp\appcfg4768292050846213939.tmp' 扫描 jsp 文件。编译jsp文件。扫描本地磁盘上的文件。java.io.IOException: Jar C:\Users\leet\AppData\Local\Temp\appcfg4768292050846213939.tmp\WEB-INF\lib\appengine-api-1.0-sdk-1.7.7.jar 太大。考虑使用 --enable_jar_splitting。

我发出了这样的命令,但它不适用于--enable_jar_splitting。

"C:\Program Files\Java\jdk1.7.0_17\bin\java.exe" -Xmx1100m -cp "%~dp0..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin .AppCfg --enable_jar_splitting -e user@domain.com update "C:\myfolder\myproject\war"

任何意见?

4

4 回答 4

4

Java App Engine 1.7.7.1 SDK 已发布以解决此 Windows 特定问题。Google Eclipse 插件以及 Google App Engine Maven 工件和插件已更新(仅使用 1.7.7.1 版本)。

于 2013-04-17T03:51:09.303 回答
0

i solved the issue by splitting the "appengine-api-1.0-sdk-1.7.7.jar" file my own.

in case anyone else want to know how to do that, follow these steps

1) unzip "appengine-api-1.0-sdk-1.7.7.jar" file from 7z.

2) balance them into 2 folders (each about 15mb) regardless any structure.

3) name the first folder as "appengine-api-1.0-sdk-1.7.7-1" and second folder as "appengine-api-1.0-sdk-1.7.7-2".

4) make sure you have jdk installed. e.g. "C:\Program Files\Java\jdk1.7.0_17\bin". set it to environment so you can run the file from that bin folder.

5) IMPORTANT: you must go into that first "appengine-api-1.0-sdk-1.7.7-1" folder and not at the parent folder of those folders.

6) launch cmd.exe and type "jar cf appengine-api-1.0-sdk-1.7.7-1.jar *" for the first archive.

7) do it again the same for the second archive (repeat step 5 and step 6).

8) go to \war\web-inf\libs folder, delete the existing appengine-api-1.0-sdk-1.7.7.jar.

9) copy and paste the appengine-api-1.0-sdk-1.7.7-1.jar and appengine-api-1.0-sdk-1.7.7-2.jar into \war\web-inf\libs folder.

10) now deploy it. it should work like charms!

EDIT: Spelling correction.

于 2013-04-10T06:32:54.060 回答
0

to solve the library error message, you have to do this:

1) open your windows explorer and locate it to your eclipse folder. e.g. ".\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.7.7\appengine-java-sdk-1.7.7\lib\user".

2) you will then see a file called "appengine-api-1.0-sdk-1.7.7.jar", rename it to "appengine-api-1.0-sdk-1.7.7.original". (just don't delete as you need in future)

3) copy that 2 files you created earlier - "appengine-api-1.0-sdk-1.7.7-1.jar" and "appengine-api-1.0-sdk-1.7.7-2.jar" and paste into this folder.

4) switch it eclipse ide, clean the project and rebuild it. then, the error message will go away.

于 2013-04-10T07:52:47.570 回答
0

使用该指令:

To clarify, we're going to release a minor update for 1.7.7. For the
meantime, you can re-jar the file as follows:

cd to the working directory
$ jar xf somewhere\appengine-java-sdk-1.7.7\lib\user\
appengine-api-1.0-sdk-1.7.7.**jar
$ jar cfm somewhere\appengine-api-1.0-sdk-1.7.7.**jar META-INF/MANIFEST.MF *
and replace the old jar with the newly created one.

http://www.mail-archive.com/google-appengine@googlegroups.com/msg67954.html 和来自解决方案的消息here,我能够使它像这样工作:

打开命令行并进入 jar.exe 文件所在的 JAVA 安装的 bin 目录

cd "C:\Program Files\Java\jdk1.7.0_17\bin\"

然后,您需要在计算机的某个位置找到“appengine-api-1.0-sdk-1.7.7.jar”文件。它位于 Eclipse 项目的 \war\WEB-INF\lib 文件夹以及 Eclipse 安装的“plugins”文件夹中的 2 个位置(不包括临时目录)。正是在那里:\plugins\com.google.appengine.eclipse.sdkbundle_1.7.7\appengine-java-sdk-1.7.7\lib\ 您只需要这两条路径之一。

现在在命令行中,只需键入:

jar xf "C:\whatever-folder-your-eclipse-is-in\plugins\com.google.appengine.eclipse.sdkbundle_1.7.7\appengine-java-sdk-1.7.7\lib\user\appengine-api-1.0-sdk-1.7.7.jar"

接着

jar cfm "C:\whatever-folder-your-eclipse-is-in\plugins\com.google.appengine.eclipse.sdkbundle_1.7.7\appengine-java-sdk-1.7.7\lib\user\appengine-api-1.0-sdk-1.7.7.jar" META-INF/MANIFEST.MF

现在,如果您转到该文件夹​​并检查 .jar 文件,它现在应该是 11 mb 而不是 30 的东西。现在您需要复制这个并替换 \war\WEB-INF\lib\ 的 webapp 文件夹中的相同 jar,以便名为“appengine-api-1.0-sdk-1.7.7.jar”的两个 jar 有 11 mb尺寸。

现在错误应该消失了,你不必拆分任何东西。

于 2013-04-12T03:28:39.573 回答