Guava 番石榴和javafx

Guava 番石榴和javafx,guava,google-apps,google-contacts-api,Guava,Google Apps,Google Contacts Api,我正在编写一个javafx应用程序来检索google联系人 在使用netbeans清理和构建应用程序并在我的web浏览器(firefox)中执行应用程序后,一切都很顺利,但当应用程序位于不同的服务器时,应用程序抛出一个带有“com.google.common.collect.Multisets”的“ClassCirculartyError” 此错误仅在应用程序尝试执行下一个代码时发生: ContactFeed result = service.getFeed(url, ContactFeed.c

我正在编写一个javafx应用程序来检索google联系人

在使用netbeans清理和构建应用程序并在我的web浏览器(firefox)中执行应用程序后,一切都很顺利,但当应用程序位于不同的服务器时,应用程序抛出一个带有“com.google.common.collect.Multisets”的“ClassCirculartyError”

此错误仅在应用程序尝试执行下一个代码时发生:

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”在番石榴中


我不知道为什么当所有东西都位于不同的服务器而不是本地机器时,应用程序会失败

类路径上似乎有一些Guava类的多个版本,导致类加载时出错。确保类路径中没有guava jar的多个版本,或者guava.jar和google-collections.jar(旧项目)都没有。并检查gdata客户端jar是否未嵌入番石榴的副本