我在发布前做了我的阅读
我知道在这个问题上有很多问题
我已经阅读了所有我能找到的内容,但没有找到有帮助的问题和建议。
我的环境
Windows 7 64位
GAE SDK 1.8.8
JDK的1.7.0_45版
eclipse kepler 4.3.1 + google plugin。
我试过的东西
以下是我已经尝试过的事情:
1)将系统变量JAVA_HOME更改为指向C:\ Program Files \ Java \ jdk1.7.0_45
2)确保系统变量PATH包含C:\ Program Files \ Java \ jdk1.7.0_45 \ bin
3)当打开命令窗口并运行java -version和javac -version时,我得到:
C:\Users\epeleg>java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
C:\Users\epeleg>javac -version
javac 1.7.0_45
4)检查所有我的JSP页面(只有2个)在开发服务器
中使用时是否正常工作 5)修改了C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin\appcfg.cmd
,以便其中的命令以@%JAVA_HOME%\bin\java ...
而不是java
开头......
日志显示的内容 部署过程报告:
Preparing to deploy:
Created staging directory at: 'C:\Users\epeleg\AppData\Local\Temp\appcfg1552018719531070310.tmp'
Scanning for jsp files.
Compiling jsp files.
com.google.appengine.tools.admin.JspCompilationException: Failed to compile the generated JSP java files.
ינו 13, 2014 3:20:30 PM org.apache.jasper.JspC processFile
INFO: Built File: \myFirstJSP.jsp
ינו 13, 2014 3:20:30 PM org.apache.jasper.JspC processFile
INFO: Built File: \mySecondJSP.jsp
Debugging information may be found in C:\Users\epeleg\AppData\Local\Temp\appengine-deploy4888568219008828635.log
“暂存目录”似乎是o.k. (但也许那里缺少图书馆?!) 并且日志文件包含以下文本:
Unable to update:
com.google.appengine.tools.admin.JspCompilationException:无法编译生成的JSP java文件。 在com.google.appengine.tools.admin.Application.compileJavaFiles(Application.java:840) 在com.google.appengine.tools.admin.Application.compileJsps(Application.java:801) 在com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:615) 在com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:418) 在com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:55) 在com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433) 在com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:158) 在org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) 在org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
我的问题
1)寻找关于我还能尝试什么的想法
2)有没有办法直接在登台文件夹中从命令窗口模拟编译,以便我可能希望看到实际有用的错误消息?
3)错误说Failed to compile the generated JSP java files
- 那些生成的文件应该在哪里?
4)有没有办法直接从命令行运行appcfg.cmd(以及使用什么参数),这样我就可以看到它的输出(假设插件隐藏了一些东西......)。
答案 0 :(得分:2)
问题已解决
以下是我为解决此问题所做的工作,希望它能帮助其他有类似问题的人。
我决定尝试从命令行运行上传,而不是使用插件。
这就是我得到的:
[注意我在@echo off命令中添加了rem,并在appcfg.cmd中从java命令的开头删除了@,以便所有命令都回显到控制台]
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>appcfg.cmd update "X:\path\to\my\project\war"
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem @echo off
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem Copyright 2009 Google Inc. All Rights Reserved.
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem Launches the AppCfg utility, which allows Google App Engine
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem developers to deploy their application to the cloud.
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>C:\Program Files\Java\jdk1.7.0_45\bin\java -Djava.home="C:\Program Files\Java\jdk1.7.0_45\jre" -Xmx1100m -cp "C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin\\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg update "X:\path\to\my\project\war"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
好的,所以我再次编辑了appcfg.cmd并将其最后一行更改为:
"%JAVA_HOME%\bin\java" -Djava.home="%JAVA_HOME%\jre" -Xmx1100m -cp "%~dp0\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg %*
再试一次:
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>appcfg.cmd update "X:\path\to\my\project\war"
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem @echo off
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem Copyright 2009 Google Inc. All Rights Reserved.
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem Launches the AppCfg utility, which allows Google App Engine
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>rem developers to deploy their application to the cloud.
C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin>"C:\Program Files\Java\jdk1.7.0_45\bin\java" -Djava.home="C:\Program Files\Java\jdk1.7.0_45\jre" -Xmx1100m -cp "C:\Program Files\GAE\appengine-java-sdk-1.8.8\bin\\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg update "X:\path\to\my\project\war"
Θ≡σ 13, 2014 5:17:12 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Reading application configuration data...
Θ≡σ 13, 2014 5:17:13 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed X:/path/to/my/project/war\WEB-INF/appengine-web.xml
Θ≡σ 13, 2014 5:17:13 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed X:/path/to/my/project/war\WEB-INF/web.xml
Θ≡σ 13, 2014 5:17:13 PM com.google.apphosting.utils.config.IndexesXmlReader readConfigXml
INFO: Successfully processed X:/path/to/my/project/war\WEB-INF\appengine-generated\datastore-indexes-auto.xml
Beginning interaction for module default...
Email: myemail@mydomain.com
Password for myemail@mydomain.com:
0% Created staging directory at: 'C:\Users\epeleg\AppData\Local\Temp\appcfg8197335956386755707.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.
C:\Users\epeleg\AppData\Local\Temp\1389626267515-0\org\apache\jsp\myFirstJSP_jsp.java:6: error: package com.mycompany does not exist
import com.mycompany.*;
^
C:\Users\epeleg\AppData\Local\Temp\1389626267515-0\org\apache\jsp\mySecondJSP_jsp.java:6: error: package com.mycompany does not exist
import com.mycompany.*;
^
C:\Users\epeleg\AppData\Local\Temp\1389626267515-0\org\apache\jsp\myFirstJSP_jsp.java:6: error: package com.mycompany does not exist
import com.mycompany.*;
^
C:\Users\epeleg\AppData\Local\Temp\1389626267515-0\org\apache\jsp\mySecondJSP_jsp.java:6: error: package com.mycompany does not exist
import com.mycompany.*;
^
2 errors
Error Details:
Θ≡σ 13, 2014 5:17:48 PM org.apache.jasper.JspC processFile
INFO: Built File: \myFirstJSP.jsp
Θ≡σ 13, 2014 5:17:48 PM org.apache.jasper.JspC processFile
INFO: Built File: \mySecondJSP.jsp
com.google.appengine.tools.admin.JspCompilationException: Failed to compile the generated JSP java files.
Unable to update app: Failed to compile the generated JSP java files.
Please see the logs [C:\Users\epeleg\AppData\Local\Temp\appcfg6545644664045561868.log] for further information.
所以我去了我的JSP,从页面标签中删除了有问题的导入属性,再次尝试,这次它有效。
现在,我不知道为什么插件无法显示appcfg.cmd输出中最重要的行,但对我来说这感觉就像某种bug。
两行摘要
在命令窗口中运行<path-to-appengine-java-sdk>\bin\appcfg.cmd update <war-location>
,
它将为您提供插件所做的更详细的输出,并且最有可能让您在几分钟内解决问题。
如果失败了,欢迎您按照我在问题机构中提到的所有步骤,过去似乎帮助了其他人。