#google-apis-explorer中的伞例外

时间:2018-03-08 10:34:23

标签: google-cloud-endpoints google-apis-explorer

Google Cloud Endpoints Java框架升级到v2,以及使用Google API Explorer#google-apis-explorer从Java 7升级到Java 8后,资源管理器会打开API列表但当打开API方法执行调用时没有任何返回,似乎无法找到API方法 并且抛出这个Umbrella异常,即使调用API工作正常。

Uncaught Error: com.google.gwt.event.shared.UmbrellaException: Exception caught: Exception caught: undefined
    at UmbrellaException_0.createError (com.google.api.explorer.Explorer-0.js:12743)
    at UmbrellaException_0.initializeBackingError (com.google.api.explorer.Explorer-0.js:12793)
    at UmbrellaException_0.Throwable_2 (com.google.api.explorer.Explorer-0.js:12689)
    at UmbrellaException_0.Exception_2 (com.google.api.explorer.Explorer-0.js:12873)
    at UmbrellaException_0.RuntimeException_2 (com.google.api.explorer.Explorer-0.js:36112)
    at UmbrellaException_0.UmbrellaException (com.google.api.explorer.Explorer-0.js:56492)
    at new UmbrellaException_0 (com.google.api.explorer.Explorer-0.js:56547)
    at HandlerManager.fireEvent_1 [as fireEvent] (com.google.api.explorer.Explorer-0.js:56196)
    at FlexTable.fireEvent (com.google.api.explorer.Explorer-0.js:3323)
    at fireNativeEvent (com.google.api.explorer.Explorer-0.js:23173)
    at FlexTable.onBrowserEvent (com.google.api.explorer.Explorer-0.js:3372)
    at dispatchEventImpl (com.google.api.explorer.Explorer-0.js:63206)
    at dispatchEvent_3 (com.google.api.explorer.Explorer-0.js:63196)
    at HTMLTableElement.dispatchEvent_5 (com.google.api.explorer.Explorer-0.js:64267)
    at apply_57 (com.google.api.explorer.Explorer-0.js:50314)
    at entry0 (com.google.api.explorer.Explorer-0.js:50378)
    at HTMLTableElement.<anonymous> 

I used to get this before migration But after Migration Nothing return

1 个答案:

答案 0 :(得分:1)

您如何为API注释?迁移后我遇到了同样的问题,问题是小写的httpMethod,在迁移之前我的API看起来像这样:

@ApiMethod(name = "getSomething", httpMethod = "get")

但迁移后你必须使用大写的httpMethods:

@ApiMethod(name = "getSomething", httpMethod = "GET")

@ApiMethod(name = "getSomething", httpMethod = HttpMethod.GET)