![](/img/trans.png)
[英]Google App Engine - Failed to compile the generated JSP java files
[英]Failed to compile the generated JSP java files to App Engine Google Glass
我正在為Google Glass開發Glassware。 我想看看我是否可以將Glassware上傳到App Engine,所以我得到了支持App Engine的最新版本(位於GitHub上: https : //github.com/googleglass/mirror-quickstart-java/releases/tag/app - 發動機 )。 我更改了API代碼和我的App Engine應用程序名稱,並使用Eclipse和appcfg.cmd上的Google App Engine SDK通過命令提示符將其部署到App Engine。 部署它時,我遇到以下錯誤:
Failed to compile the generated JSP java files to App Engine
我得到的完整錯誤如下(這是來自它的命令提示符版本):
warning: Supported source version 'RELEASE_6' from annotation processor 'com.goo
gle.appengine.tools.compilation.DatastoreCallbacksProcessor' less than -source '
1.7'
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:7: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Contact;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:11: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.TimelineItem;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:12: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Subscription;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:13: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Attachment;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:7: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Contact;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:11: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.TimelineItem;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:12: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Subscription;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:13: error: package com.google.api.services.mirror.model does not exist
import com.google.api.services.mirror.model.Attachment;
^
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:69: error: cannot find symbol
Contact contact = MirrorClient.getContact(credential, MainServlet.CONTACT_NAME
);
^
symbol: class Contact
location: class index_jsp
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:69: error: cannot access Contact
Contact contact = MirrorClient.getContact(credential, MainServlet.CONTACT_NAME
);
^
class file for com.google.api.services.mirror.model.Contact not found
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:71: error: cannot find symbol
List<TimelineItem> timelineItems = MirrorClient.listItems(credential, 3L).getI
tems();
^
symbol: class TimelineItem
location: class index_jsp
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:71: error: cannot access TimelineListResponse
List<TimelineItem> timelineItems = MirrorClient.listItems(credential, 3L).getI
tems();
^
class file for com.google.api.services.mirror.model.TimelineListResponse not f
ound
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
a:74: error: cannot find symbol
List<Subscription> subscriptions = MirrorClient.listSubscriptions(credential).
getItems();
^
symbol: class Subscription
location: class index_jsp
C:\Users\Family3\AppData\Local\Temp\1382233159652-0\org\apache\jsp\index_jsp.jav
Index.jsp位於: https : //github.com/googleglass/mirror-quickstart-java/blob/8a7edd5eb8c2710b841294ca5d7d69bd176693bf/web/index.jsp
由於某種原因,mirror.model jar旁邊有一個奇怪的源圖標。 其他罐子都沒有。 它的圖片如下: 我可能從另一個地方拿到罐子嗎?
此外,有人建議添加
<packaging>war</packaging>
到pom.xml。 這也沒有解決問題,它有與之前相同的錯誤。
我不知道為什么我會收到這個錯誤。 這似乎是JSP文件的一個問題,但這是Glass團隊發布的版本。 也許我需要改變一些東西? 也許這是一些罐子的問題? 謝謝您的幫助。
我有同樣的問題,我通過添加解決了它
<packaging>war</packaging>
在pom.xml中,所以pom.xml文件是:
`
<modelVersion>4.0.0</modelVersion>
<groupId>com.google</groupId>
<artifactId>glass-java-starter</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
`現在我使用下面的命令編譯並上傳到app引擎
mvn clean install
appcfg.sh update target/glass-java-starter-0.1-SNAPSHOT
如果你還有問題,請告訴我。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.