3

I'm developing Glassware for Google Glass. I wanted to see if I could upload Glassware to App Engine, so I got the latest version that supports App Engine (located on GitHub here: https://github.com/googleglass/mirror-quickstart-java/releases/tag/app-engine). I changed the API codes and my App Engine Application name, and deployed it to App Engine using the Google App Engine SDK on Eclipse & appcfg.cmd via command prompt. When deploying it, I have gotten the following error:

Failed to compile the generated JSP java files to App Engine

The full error that I'm getting is below (this is from the command prompt version of it):

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 is located here: https://github.com/googleglass/mirror-quickstart-java/blob/8a7edd5eb8c2710b841294ca5d7d69bd176693bf/web/index.jsp

For some reason the mirror.model jar has a weird sources icon next to it. None of the other jars have it. A picture of it is below:enter image description here Could I possibly be getting the jar from another place?

Also, someone suggested adding

<packaging>war</packaging>

to the pom.xml. That didn't fix the problem either, it had the same errors that I had before.

I have no clue why I'm getting this error. It seems to be a problem with the JSP file, but this was the version released from the Glass team. Maybe I need to change something in it? Maybe it's a problem with some of the jars? Thank you for your help.

hichris123
  • 10,145
  • 15
  • 56
  • 70
  • is your problem resolved? – Karthi Ponnusamy Jun 18 '14 at 09:15
  • @Karthi Nope. Have you found a solution for it? – hichris123 Jun 18 '14 at 22:43
  • Actually I had problem in one of my jsp file. One library import is failed in that particular jsp file. When running the app in development mode you won't encounter this error until you visit that page. But when you deploy app to server it will compile all your jsp files, and if there any problem it will through error. Solution is visit all your jsp files in dev mode then you can find the error and fix it and deploy to app engine. – Karthi Ponnusamy Jun 19 '14 at 06:24

1 Answers1

1

I have the same issue, and I solved it by add

<packaging>war</packaging>

in the pom.xml, so the pom.xml file is :

`

<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>

` now I am using below command to compile and upload to app engine

mvn clean install
appcfg.sh update target/glass-java-starter-0.1-SNAPSHOT

let me know if you still have problem with it.

xuzhuo
  • 11
  • 1