添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Error: Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:118) com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:100) at com.google.gdata.client.Service.<clinit>(Service.java:532) at RotorTecnology.GoogleGenericDB.autentic(GoogleGenericDB.java:48) at RotorTecnology.GoogleGenericDB.main(GoogleGenericDB.java:315) Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 5 more

Original issue reported on code.google.com by [email protected] on 1 Sep 2009 at 1:59

I believe you are missing google-collections jar.  See
http://code.google.com/p/gdata-java-client/wiki/Dependencies for list of 
dependencies
for this library.

Original comment by [email protected] on 1 Sep 2009 at 2:24

  • Changed state: RequestedFeedback
  • i am also getting same error,but i am able to download google-collections jar 
    when i go to http://code.google.com/p/gdata-java-client/wiki/Dependencies 
    it shows google-collections pdf not google-collections.jar
    i am attaching the error message
    please help me out...
    

    Original comment by [email protected] on 28 Oct 2010 at 9:16

    Attachments:

  • error.txt
  • i am also getting same error,but i am able to download google-collections jar 
    when i go to http://code.google.com/p/gdata-java-client/wiki/Dependencies 
    it shows google-collections pdf not google-collections.jar
    i am attaching the error message
    please help me out...
    

    Original comment by [email protected] on 28 Oct 2010 at 9:23

    Attachments:

  • error.txt
  • as you can read on this site the project has evolved into guava:
    http://code.google.com/p/guava-libraries/downloads/list
    

    Original comment by [email protected] on 10 Nov 2010 at 3:27

    I solved this problem by download the jar file guava-r07.jar. 
    http://code.google.com/p/guava-libraries/downloads/detail?name=guava-r07.zip
    Try it.
    

    Original comment by [email protected] on 1 Dec 2010 at 10:44

    I m getting the same error & plz tell me the steps to install guava-r07 .jar in 
    eclipse sdk5.3.2.
    Please help me  fast............................
    

    Original comment by [email protected] on 28 Sep 2011 at 12:01

    Helped Me.. Thanks but now during Oauth process i am getting 
    com.google.gdata.client.authn.oauth.OAuthException: Error getting HTTP 
    response.. Can anyone help me?
    

    Original comment by [email protected] on 21 Feb 2012 at 7:21

    Helped Me.. Thanks but now during Oauth process i am getting 
    com.google.gdata.client.authn.oauth.OAuthException: Error getting HTTP 
    response.. Can anyone help me?
    

    Original comment by [email protected] on 21 Feb 2012 at 7:21

    Exception in thread "main" java.lang.NoSuchMethodError: 
    com.google.common.collect.ImmutableSet.copyOf([Ljava/lang/Object;)Lcom/google/co
    mmon/collect/ImmutableSet;
    I am getting this error in my code and code is attached below
    

    Original comment by [email protected] on 15 Jun 2012 at 4:13

    Attachments:

  • FileUpload.java
  • I've been fighting with a lot of dependency issues with gdata - I don't think 
    guava-11.0.2.jar is the fix - I added that. Is it possible that developing with 
    app engine means appengine-sdk jars are compiled with older versions of 
    com.google.common.collect?  Since the guide says to compile with an rc1 of 
    collections, i'd be nice to get an updated guide that takes into account app 
    engine projects. Really stuck here.
    java.lang.NoSuchMethodError: 
    com.google.common.collect.ImmutableSet.copyOf([Ljava/lang/Object;)Lcom/google/co
    mmon/collect/ImmutableSet;
    

    Original comment by [email protected] on 26 Jul 2012 at 4:17

    I'm in this boat too.
    Appengine has a bunch of core guava classes repackaged in the appengine jars, 
    which are loading those classes before my updated classes.
    Even if we can get our development servers working right, will the production 
    environment have loaded the repackaged classes before our libs get checked?
    

    Original comment by [email protected] on 7 Aug 2012 at 8:41

    Looking into the repackaged classes, and the method signature appears to be 
    valid in both my copy of guava, and the repackaged copy (found in 
    appengine-api-labs.jar).
    I did, however find a workaround:
    Include guava source on your classpath, as it will override whatever copy 
    appengine is using.  I had to take com.google.common.collect and 
    com.google.common.base (guice decided to complain as soon as I took 
    ImmutableSet but not a bunch of others).
    Recommended use of workaround is to link source in eclipse to a copy of guava 
    source
    git clone https://code.google.com/p/guava-libraries/
    I used source inclusion patterns **/base/** and **/collect/** to pull in the 
    necessary classes to defeat this bug.
    Can someone in google submit a request for appengine to repackage updated jars?
    

    Original comment by [email protected] on 7 Aug 2012 at 9:17

    real thanks to this forum. this error was killing me since yesterday, guava 
    solved my problem also
    

    Original comment by [email protected] on 5 Jul 2013 at 6:28

    i hav downloaded the guava 16.0.1 jar.. but it has following Exception
    Exception  :  Unrecognized content type:text/html;charset=UTF-8
    

    Original comment by [email protected] on 11 Apr 2014 at 8:56

    please help me with a Google Calendar code in which i included the jars file 
    listed below:
    guava-17.0.jar
    gdata-core-1.0.jar
    gdata-client-1.0.jar
    gdata-calendar-1.0.jar and
    google-collections-1.0-rc2.jar
    although i am getting the exception i.e.
    Exception in thread "main" java.lang.NoSuchMethodError: 
    com.google.common.collect.ImmutableSet.copyOf([Ljava/lang/Object;)Lcom/google/co
    mmon/collect/ImmutableSet;
    com.google.gdata.wireformats.AltFormat$Builder.setAcceptableTypes(AltFormat.java
    :399)
        at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableXmlTypes(AltFormat.java:387)
        at com.google.gdata.wireformats.AltFormat.<clinit>(AltFormat.java:49)
        at com.google.gdata.client.Service.<clinit>(Service.java:558)
        at cala.Cala.main(Cala.java:205)
    

    Original comment by [email protected] on 4 May 2014 at 8:50

    Attachments:

  • exception.txt
  •