Stay organized with collections Save and categorize content based on your preferences.
This page describes migrating an existing Cloud Endpoints version 1.0 application to Endpoints Frameworks for App Engine in Java.
Note: This page refers to Endpoints 1.0 as Endpoints Frameworks version 1.0 and new Endpoints Frameworks for App Engine as Endpoints Frameworks version 2.0. BenefitsThe new framework brings a number of benefits, including:
Endpoints Frameworks version 2.0 doesn't affect the interfaces to your API. Existing clients continue to work after migration without any client-side code changes.
The following features aren't currently available. If you require any of these, please submit a feature request.
fields
partial responsesIn addition, Android Studio support for Endpoints version 1.0 isn't currently supported for version 2.0.
Migrating to Endpoints Frameworks version 2.0Endpoints Frameworks version 2.0 has moved to Maven artifacts in group com.google.endpoints
. The base required JAR is in the endpoints-framework
artifact. If you wish to use Guice configuration, add the endpoints-framework-guice
artifact.
The following instructions provide an example of how to migrate from Endpoints Frameworks version 1.0 to Endpoints Frameworks version 2.0 by using a Discovery Document:
Note: If you are using Endpoints Frameworks version 1.0 with Eclipse, first convert your project to a Maven project and then follow the Maven instructions below.gcloud auth login
gcloud auth application-default login
app-engine-java
component:
gcloud components install app-engine-java
gcloud components update
appengine-endpoints
artifact:com.google.appengine
, is incompatible with the Endpoints Frameworks plugin. You must use the new version.web.xml
file:
SystemServiceServlet
to EndpointsServlet
/_ah/spi/
to the new required path /_ah/api/
The following shows the contents of the web.xml
before and after migration:
web.xml
: After migration Endpoints Frameworks version 2.0 web.xml
:mvn clean
mvn endpoints-framework:discoveryDocsLearn more about the Maven Endpoints Frameworks plugin goals.
mvn appengine:deploy
Learn more about the Maven App Engine plugin goals.
Note: When migrating, you must deploy to a new App Engine version. This is done automatically if you don't specify a version. See Known issues.appengine-endpoints
artifact:
compile group: 'com.google.appengine', name: 'appengine-endpoints', version: '+'
web.xml
file:
SystemServiceServlet
to EndpointsServlet
/_ah/spi/
to the new required path /_ah/api/
The following shows the contents of the web.xml
before and after migration:
web.xml
: After migration Endpoints Frameworks version 2.0 web.xml
:gradle clean
gradle endpointsDiscoveryDocsLearn more about the Gradle Endpoints Frameworks plugin tasks
gradle appengineDeploy
Learn more about the Gradle App Engine plugin tasks.
Note: When migrating, you must deploy to a new App Engine version. This is done automatically if you don't specify a version. See Known issues.If you wish to use Guice:
EndpointsModule
, and configure it, as follows:You can verify that the new framework is serving traffic:
In the Google Cloud console, go to the Logging > Logs Explorer page.
If requests are shown with paths beginning with /_ah/api
, then Endpoints Frameworks version 2.0 is now serving your API. The logs shouldn't show any requests with paths beginning with /_ah/spi
. These requests indicate that the Endpoints Frameworks version 1.0 proxy is still serving requests.
Endpoints Frameworks version 2.0 also lets you turn on API management features, including:
To get started using these features, see Adding API management.
TroubleshootingThis section describes common erratic behaviors when migrating to Endpoints Frameworks version 2.0 and suggested solutions.
API returns404
errors, but API Explorer still lists APIs correctly
You are required to remove the old Endpoints Frameworks version 1.0 configuration when migrating to Endpoints Frameworks version 2.0. If the old configuration is still present in the application configuration, the Endpoints service continues to treat the app as a version 1.0 app. You may see requests in your App Engine logs sent to /_ah/spi
, which result in HTTP 404
errors sent to the client.
Remove the following lines from your web.xml
file, if they are present:
<servlet>
<servlet-name>SystemServiceServlet</servlet-name>
<servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
<init-param>
<param-name>services</param-name>
<param-value>...</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>SystemServiceServlet</servlet-name>
<url-pattern>/_ah/spi/*</url-pattern>
</servlet-mapping>
Make sure your web.xml
file contains the following:
<servlet-mapping>
<servlet-name>EndpointsServlet</servlet-name>
<url-pattern>/_ah/api/*</url-pattern>
</servlet-mapping>
You must package only the endpoints-framework
artifact into your application, not the old appengine-endpoints
JAR. If you deploy an application with both JARs, you might run into reflection errors or runtime type errors, such as NoClassDefFoundError
, NoSuchMethodError
, and ClassCastException
. Remove the following lines from your build file, if they are present:
compile group: 'com.google.appengine', name: 'appengine-endpoints', version: '+'
In addition, if any of your other dependencies depend on older versions of Guava, this can also manifest as a missing TypeToken
method. You must ensure that you use Guava v19 or use the endpoints-framework-all
artifact, which shadows dependencies.
If you see an error such as, method does not override or implement a method from a supertype
, or cannot find symbol method setBatchPath(String)
, then your client application likely depends on an old version of the Google Java client library. You must ensure that your google-api-client
artifact is 1.23.0
or higher.
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client</artifactId> <version>1.23.0</version> </dependency>Gradle
compile group: 'com.google.api-client', name: 'google-api-client', version: '1.23.0'Issues with JPA/JDO Datanucleus enhancement Maven
The new Google Cloud CLI-based App Engine Maven plugin doesn't support Datanucleus enhancement of any type. If your project uses the Datanucleus JDO or JPA enhancement support from the old plugin, you must configure the third-party Datanucleus Maven plugin separately when you migrate. See the following for more information:
GradleIf your project uses the gradle-appengine-plugin
JPA/JDO Datanucleus enhancement, you must manually configure Datanucleus enhancement after switching to the new gcloud CLI-based Gradle plugin. See an example from Stackoverflow.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This guide provides instructions for migrating an existing Cloud Endpoints version 1.0 application to Endpoints Frameworks version 2.0 in Java, which brings benefits like reduced latency and better App Engine integration."],["The migration process involves updating dependencies to use the `com.google.endpoints` group for Endpoints Frameworks, replacing the old App Engine Maven plugin, and updating the API entry point in the `web.xml` file by renaming `SystemServiceServlet` to `EndpointsServlet` and changing the path from `/_ah/spi/*` to `/_ah/api/*`."],["Endpoints Frameworks version 2.0 does not affect the API interfaces, so existing clients can continue to work without code changes, however, some features like JSON-RPC, automatic ETags, and IDE integration are not currently available."],["The guide details migration steps using both Maven and Gradle, including removing old dependencies, adding new ones, and applying the correct plugins, and it also gives instructions on deploying and generating discovery documents."],["Using Guice is an option for configuring Endpoints Frameworks, which requires adding the `endpoints-framework-guice` dependency and declaring and configuring a new module extending `EndpointsModule`."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4