- compile 'com.google.appengine:appengine-endpoints:1.9.42'
+ compile 'com.google.endpoints:endpoints-framework:2.0.0-beta.8'
- <servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
+ <servlet-class>com.google.api.server.spi.EndpointsServlet</servlet-class>
- <url-pattern>/_ah/spi/*</url-pattern>
+ <url-pattern>/_ah/api/*</url-pattern>
I did *not* run the "generating client lib" as documented in https://cloud.google.com/endpoints/docs/frameworks/java/generate-client-libraries-android as I thought, "from the client perspective it should be the same".
I hit this error in the server:
SEVERE: javax.servlet.ServletContext log: unavailable
com.google.api.server.spi.config.validation.InconsistentApiConfigurationException: api: API-wide configuration does not match between the classes com.foobar.ApiV2Public and com.foobar.ApiV2. All API classes with the same API name and version must have the exact same API-wide configuration. Differing property: issuers (com.google.api.server.spi.config.model.ApiIssuerConfigs@0 vs com.google.api.server.spi.config.model.ApiIssuerConfigs@d03e1481).
at com.google.api.server.spi.config.validation.ApiConfigValidator.validate(ApiConfigValidator.java:89)
at com.google.api.server.spi.SystemService.registerLoadedService(SystemService.java:218)
at com.google.api.server.spi.SystemService.registerService(SystemService.java:193)
How do I fix this?
I'm sorry for not making it clear. The sample code is _working_, you need to migrate it to Endpoints v2 as mentioned in the README.md to make it not working. Anyway, for your convenience, I've attached the migrated version (which is not working).