【问题标题】:Umbrella Exception in #google-apis-explorer#google-apis-explorer 中的 Umbrella 异常
【发布时间】:2018-03-08 10:34:23
【问题描述】:

在将 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

【问题讨论】:

  • 您能否更具体一些并更好地解释您的问题是什么?您的应用程序在升级之前是如何工作的?
  • 感谢您的更新。迁移框架和Java版本的时候,有没有关注thesesteps?能否请您添加导致错误的代码?

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


【解决方案1】:

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

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

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

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

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

【讨论】:

  • 非常感谢。一旦我将它更改为 HttpMethod.GET 它就完成了(y),我正在注释它“get”
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多