Thanks so much, I was going crazy.  This has me up and running

On Jul 8, 9:07 pm, viku <[email protected]> wrote:
> I too encountered the java.lang.NoClassDefFoundError: com/google/
> common/collect/Maps and solved it by downloading the google-
> collect--1.0-rc2.zip fromhttp://code.google.com/p/google-collections/
> and including the google-collect--1.0-rc2.jar in my application
> library.
>
> Hope this helps.
> viku
>
> On Jul 4, 8:02 am, David <[email protected]> wrote:
>
> > Hi All,
>
> > Its a couple of years since I used java and I am trying to dive
> > straight in her and having a small prob
>
> > Here is my code
>
> > import com.google.gdata.client.contacts.ContactsService;
> > import com.google.gdata.util.AuthenticationException;
>
> > public class ContactsExample {
>
> > public ContactsExample()
> >         {
> >         final String username = "*****[email protected]";
> >         final String password = "*******";  // deleted for ublic posting
>
> >         System.out.println("Contacting to google...");
>
> >         final ContactsService myService = new ContactsService("exampleCo-
> > exampleApp-1");
> >         try {
> >                 myService.setUserCredentials(username, password);
> >         } catch (final AuthenticationException e) {
> >                 // TODO Auto-generated catch block
> >                 e.printStackTrace();
> >         }
>
> >         System.out.println("Closing Connection");
> >         }
> > public static void main(String[] args) {
> >         new ContactsExample();
>
> > }
> > }
>
> > And here is the error
>
> > Exception in thread "main" java.lang.NoClassDefFoundError: com/google/
> > common/collect/Maps
> >         at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:
> > 118)
> >         at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:
> > 100)
> >         at com.google.gdata.client.Service.<clinit>(Service.java:520)
> >         at ContactsExample.<init>(ContactsExample.java:16)
> >         at ContactsExample.main(ContactsExample.java:27)
> > Contacting to google...
>
> > probably something  basic I am a bit rusty.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to