Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to compile the generated JSP java files to App Engine Google Glass

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.

like image 739
hichris123 Avatar asked Jan 27 '26 11:01

hichris123


1 Answers

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.

like image 197
xuzhuo Avatar answered Jan 29 '26 00:01

xuzhuo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!