2017-01-13 60 views
0

我正在Eclipse Mars上使用Google Cloud Endpoints和Google Cloud SDK 1.9.48構建一些業務API(4.5)。我一直在app引擎上部署它們,並使用api explorer進行測試。我們在一段時間內添加了更多的apis,一切正常。一天奇怪的是,我們觀察到奇怪的行爲對我們來說構成了阻礙。儘管部署了應用程序,但端點部署失敗。部署暫停大約2-3分鐘(似乎連接到遠程端點服務器),然後繼續進行,忽略端點的故障。端點 部署失敗Eclipse控制檯上以下日誌:記錄錯誤Google Cloud Enpoints:端點配置未更新

Will check again in 1 seconds. 
Will check again in 2 seconds. 
Will check again in 4 seconds. 
Will check again in 8 seconds. 
Will check again in 16 seconds. 
Will check again in 32 seconds. 
Will check again in 60 seconds. 
Endpoints configuration not updated. The app returned an error when the Google Cloud Endpoints server attempted to communicate with it. 
See the deployment troubleshooting documentation for more information: https://developers.google.com/appengine/docs/java/endpoints/test_deploy#troubleshooting_a_deployment_failure 
Ignoring Endpoints failure and proceeding with update. 
Closing update: new version is ready to start serving. 

在App Engine紀錄,以下:

... 驗證可用性

/_ah/SPI/BackendService.getApiConfigs java.lang.NullPointerException at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:102) at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServi ceServlet.java:73) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:637) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ...

來自servlet的未捕獲異常 java.lang.NoClassDefFoundError:com/fasterxml/jackson/databind/JsonNode at com.google.api.server.spi.SystemService $ Builder.withDefaults(SystemService.java:517) at com.google。 api.server.spi.SystemServiceServlet.createSystemService(SystemServiceServlet.java:133) ...

這裏提供的故障排除鏈接並沒有什麼幫助。 我懷疑,我的一些端點可能會導致這種失敗,但是,以任何順序評論端點類別都無濟於事。特別是,日誌無法幫助我找到錯誤的api類。 有沒有人遇到類似的問題?任何幫助,高度讚賞。

+0

[谷歌端點框架2](https://mvnrepository.com/artifact/com.google .endpoints /端點框架)? – Phoenix

回答

0

我有這個問題:

  1. 檢查您web.xml和servlet類以及映射。
  2. 檢查你的一個類是否創建了另一個類的對象(在我的情況下,它是Dao類),並且兩個對象都有相同的Objectify對象.... [基本上如果你有class1,並且如果你正在創建一個Class2中的對象(可以說class1Dao和class2Dao),並都具有相同的Objectify objcty=..... 那麼它發生的谷歌雲終端服務器就會犯糊塗]

它幫助我的情況......基本上,我做了一個非常粗魯的解決方案, 我從Class1Dao中刪除了class2Dao對象實例,並將方法從class2Dao剪切粘貼到class1Dao,其中我以前是從Class1Dao訪問。

備用解決方案將更改Objectify對象的名稱。

例如:

Objectify objctfy1=.... in class1 and Objectify objctfy2=.... in class2

希望這有助於我是否使用很不好解釋:)

相關問題