2
我正在編寫一個javafx應用程序來檢索谷歌聯繫人。番石榴和javafx
清理並使用netbeans構建應用程序並在我的web瀏覽器(firefox)中執行應用程序後,一切順利,但是當應用程序位於不同的服務器時,應用程序會拋出「ClassCircularityError」與「com.google。 common.collect.Multisets」。
此錯誤,只有當應用程序試圖執行下一個代碼發生:
ContactFeed result = service.getFeed(url, ContactFeed.class);
,這是錯誤:
java.lang.ClassCircularityError: com/google/common/collect/Multisets
at com.google.common.collect.AbstractMultiset.iterator(AbstractMultiset.java:64)
at com.google.common.collect.ConcurrentHashMultiset.iterator(ConcurrentHashMultiset.java:57)
at com.google.gdata.client.SimpleCookieManager.getCookies(SimpleCookieManager.java:72)
at com.google.gdata.client.GoogleService.getCookies(GoogleService.java:530)
at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.get(GoogleGDataRequest.java:358)
at sun.net.www.protocol.http.HttpURLConnection.setCookieHeader(HttpURLConnection.java:1180)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:612)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1320)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:2683)
at com.google.gdata.client.http.HttpGDataRequest.isOAuthProxyErrorResponse(HttpGDataRequest.java:566)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:557)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
at com.google.gdata.client.Service.getFeed(Service.java:1135)
at com.google.gdata.client.Service.getFeed(Service.java:1077)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:676)
at com.google.gdata.client.Service.getFeed(Service.java:1034)
at mypackage.myApp.start(myApp.java:51)
at com.sun.javafx.applet.FXApplet2$1.run(FXApplet2.java:131)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
「com.google.common.collect.Multisets」 是裏面番石榴。
我不知道爲什麼應用程序失敗時,一切都位於不同的服務器,而不是我的本地機器。