使用多模块maven应用程序的Google App Engine端点

时间:2022-08-22 10:19:50

hi i am using maven multi module project and google cloud endpoints as api management i am able to successfully run the application with appengine devserver but when i deploy it to appengine its shows error like.

嗨我使用maven多模块项目和谷歌云端点作为api管理我能够成功运行appengine devserver应用程序,但当我部署它appengine它的显示错误就像。

java.lang.IllegalArgumentException: Environment variable 'ENDPOINTS_SERVICE_NAME' is not set
    at com.google.api.config.ServiceConfigSupplier.get(ServiceConfigSupplier.java:99)
    at com.google.api.config.ServiceConfigSupplier.get(ServiceConfigSupplier.java:47)
    at com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:199)
    at com.google.api.config.ServiceConfigFetcher.fetch(ServiceConfigFetcher.java:40)
    at com.google.api.control.ServiceManagementConfigFilter$1.load(ServiceManagementConfigFilter.java:33)
    at com.google.api.control.ConfigFilter.init(ConfigFilter.java:87)
    at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:206)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:179)
    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:136)
    at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:504)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:446)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:453)
    at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:276)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:312)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:304)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:450)
    at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:235)
    at java.lang.Thread.run(Thread.java:745)

1 个解决方案

#1


2  

As described in the documentation, you need to deploy your API configuration and specify your service name as an environment variable.

如文档中所述,您需要部署API配置并将服务名称指定为环境变量。

#1


2  

As described in the documentation, you need to deploy your API configuration and specify your service name as an environment variable.

如文档中所述,您需要部署API配置并将服务名称指定为环境变量。