在我尝试将Api Management添加到我的项目中后,我开始收到错误ServiceConfigException ,就像这里解释的那样。
如此处所述,从web.xml行中注释掉ServiceManagementConfigFilter行可以解决我的问题,但会使我的项目没有 API 支持。
我很想得到一些帮助。提前致谢。
--------------------------------------------------------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PROJECT-NAME 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> appengine-maven-plugin:1.3.2:run (default-cli) > package @ PROJECT-NAME >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ PROJECT-NAME ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\NAME\Repos\PROJECT-FOLDER\Backend\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ PROJECT-NAME ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ PROJECT-NAME ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ PROJECT-NAME ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ PROJECT-NAME ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.6:war (default-war) @ PROJECT-NAME ---
[INFO] Packaging webapp
[INFO] Assembling webapp [PROJECT-NAME] in [C:\Users\NAME\Repos\PROJECT-FOLDER\Backend\target\PROJECT-NAME-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp webResources [C:\Users\NAME\Repos\PROJECT-FOLDER\Backend/src/main/webapp/WEB-INF] to [C:\Users\NAME\Repos\PROJECT-FOLDER\Backend\target\PROJECT-NAME-1.0-SNAPSHOT]
[INFO] Copying webapp resources [C:\Users\NAME\Repos\PROJECT-FOLDER\Backend\src\main\webapp]
[INFO] Webapp assembled in [2435 msecs]
[INFO] Building war: C:\Users\NAME\Repos\PROJECT-FOLDER\Backend\target\PROJECT-NAME-1.0-SNAPSHOT.war
[INFO]
[INFO] <<< appengine-maven-plugin:1.3.2:run (default-cli) < package @ PROJECT-NAME <<<
[INFO]
[INFO] --- appengine-maven-plugin:1.3.2:run (default-cli) @ PROJECT-NAME ---
May 03, 2018 1:15:30 AM com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineDevServer1 run
INFO: Setting appengine-web.xml configured environment variables: ENDPOINTS_SERVICE_VERSION=2017-04-20r1,ENDPOINTS_SERVICE_NAME=PROJECT-ID.appspot.com
May 03, 2018 1:15:30 AM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: C:\Program Files\Java\jdk1.8.0_131\jre\bin\java.exe -Duse_jetty9_runtime=true -D--enable_all_permissions=true -Dappengine.sdk.root=C:\Users\NAME\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java -cp C:\Users\NAME\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java\lib\appengine-tools-api.jar com.google.appengine.tools.development.DevAppServerMain --allow_remote_shutdown --disable_update_check --no_java_agent C:\Users\NAME\Repos\PROJECT-FOLDER\Backend\target\PROJECT-NAME-1.0-SNAPSHOT
[INFO] GCLOUD: May 03, 2018 1:15:30 AM java.util.prefs.WindowsPreferences <init>
[INFO] GCLOUD: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[INFO] GCLOUD: May 03, 2018 1:15:30 AM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
[INFO] GCLOUD: INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\Users\NAME\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\NAME\Repos\PROJECT-FOLDER\Backend\target\PROJECT-NAME-1.0-SNAPSHOT\WEB-INF\appengine-web.xml'
[INFO] GCLOUD: 2018-05-03 01:15:30.671:INFO::main: Logging initialized @299ms
[INFO] GCLOUD: 2018-05-03 01:15:30.937:INFO:oejs.Server:main: jetty-9.3.18.v20170406
[INFO] GCLOUD: 2018-05-03 01:15:33.340:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=2120ms
[INFO] GCLOUD: May 02, 2018 10:15:33 PM com.google.appengine.tools.development.ApiProxyLocalImpl log
[INFO] GCLOUD: INFO: javax.servlet.ServletContext log: OfyHelper: Init
[INFO] GCLOUD: May 02, 2018 10:15:46 PM com.google.api.control.Client start
[INFO] GCLOUD: INFO: starting com.google.api.control.Client@1c9f0a20
[INFO] GCLOUD: May 02, 2018 10:15:46 PM com.google.api.control.Client initializeFlushing
[INFO] GCLOUD: INFO: creating a scheduler to control flushing
[INFO] GCLOUD: May 02, 2018 10:15:46 PM com.google.api.control.Client initializeFlushing
[INFO] GCLOUD: INFO: scheduling the initial check, report, and quota
[INFO] GCLOUD: 2018-05-03 01:15:46.613:WARN:oejw.WebAppContext:main: Failed startup of context c.g.a.t.d.j.DevAppEngineWebAppContext@5e8f9e2d{/,file:///C:/Users/NAME/Repos/PROJECT-FOLDER/Backend/target/PROJECT-NAME-1.0-SNAPSHOT/,UNAVAILABLE}{C:\Users\NAME\Repos\PROJECT-FOLDER\Backend\target\PROJECT-NAME-1.0-SNAPSHOT}
[INFO] GCLOUD: com.google.api.config.ServiceConfigException: Failed to fetch service config (status code 404)
[INFO] GCLOUD: at com.google.api.config.ServiceConfigSupplier.fetch(ServiceConfigSupplier.java:143)
[INFO] GCLOUD: at com.google.api.config.ServiceConfigSupplier.get(ServiceConfigSupplier.java:111)
[INFO] GCLOUD: at com.google.api.config.ServiceConfigSupplier.get(ServiceConfigSupplier.java:49)
[INFO] GCLOUD: at com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:227)
[INFO] GCLOUD: at com.google.api.config.ServiceConfigFetcher.fetch(ServiceConfigFetcher.java:41)
[INFO] GCLOUD: at com.google.api.control.ServiceManagementConfigFilter$1.load(ServiceManagementConfigFilter.java:33)
[INFO] GCLOUD: at com.google.api.control.ConfigFilter.init(ConfigFilter.java:87)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:873)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
[INFO] GCLOUD: at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.start(Server.java:422)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.doStart(Server.java:389)
[INFO] GCLOUD: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:346)
[INFO] GCLOUD: at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
[INFO] GCLOUD: at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
[INFO] GCLOUD: at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
[INFO] GCLOUD: at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:274)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:219)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:217)
[INFO] GCLOUD: at java.security.AccessController.doPrivileged(Native Method)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:368)
[INFO] GCLOUD: at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:223)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:214)
[INFO] GCLOUD: 2018-05-03 01:15:46.625:INFO:oejs.AbstractConnector:main: Started NetworkTrafficSelectChannelConnector@2cf23c81{HTTP/1.1,[http/1.1]}{localhost:8080}
[INFO] GCLOUD: 2018-05-03 01:15:46.626:INFO:oejs.Server:main: Started @16242ms
[INFO] GCLOUD: May 02, 2018 10:15:46 PM com.google.appengine.tools.development.AbstractModule startup
[INFO] GCLOUD: INFO: Module instance default is running at http://localhost:8080/
[INFO] GCLOUD: May 02, 2018 10:15:46 PM com.google.appengine.tools.development.AbstractModule startup
[INFO] GCLOUD: INFO: The admin console is running at http://localhost:8080/_ah/admin
[INFO] GCLOUD: May 03, 2018 1:15:46 AM com.google.appengine.tools.development.DevAppServerImpl doStart
[INFO] GCLOUD: INFO: Dev App Server is now running