• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Mail Project

 
Greenhorn
Posts: 10
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one help me with my project

i am trying to retrieve gmail contacts from my GMail account using JAVA.

i have tried a lot using different api's but its not working its giving me ParserCursor error and i am not getting the api which contains ParserCursor class.

Is there any other simple way to do so.

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which API have you gone with? g4j is probably the best.
 
ranjeeth ravindran
Greenhorn
Posts: 10
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ya i have tried with g4j api but its not working

can you tell me exactly how to retrieve contacts from my GMail account using g4j api
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has nothing to do with user interfaces. Moving to Other JSE / JEE APIs.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Thread hijack removed: please start your own question in your own new topic.]
 
Ben Logan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ranjeeth ravindran wrote:ya i have tried with g4j api but its not working

can you tell me exactly how to retrieve contacts from my GMail account using g4j api



GMConnector.getContact() will return an array of contacts.

Try this for a good example:
http://www.codeuu.com/wiki/Gmail_Address_Book_Exporter
 
ranjeeth ravindran
Greenhorn
Posts: 10
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks but when i am running the project its gining me LoginException and saying Login failed.

I have ran the program according to the steps given in the html file

Please Help
 
Ben Logan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm. All I can suggest is adding some printlns before the login() call to ensure your username and password are read correctly. If they look fine, try stepping into the GMConnector to see what it's doing. Unfortunately, as is, the example doesn't tell you much when something goes wrong!
 
ranjeeth ravindran
Greenhorn
Posts: 10
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have used printlns and printed the statements.

Its taking the username and password correctly but its still not logging in.

its showing me the foll error

Feb 18, 2010 1:38:04 AM siuying.gm.Messages <clinit>
WARNING: Cannot load resource bundle! Loading default gmailer bundle ...
Feb 18, 2010 1:38:04 AM siuying.gm.GMConnector <init>
INFO: Initializing ...
Feb 18, 2010 1:38:04 AM siuying.gm.GMConnector <init>
INFO: Initialization done.
Feb 18, 2010 1:38:04 AM siuying.gm.GMConnector connect
INFO: Request Body: org.apache.commons.httpclient.methods.PostMethod@7b6889
Feb 18, 2010 1:38:06 AM siuying.gm.GMConnector connect
WARNING: Connect failed:

Please help.
 
Ben Logan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Apologies for the late response. Have you had any luck pulling down the source? I tried at access the cvs listed on sourceforge but it doesn't seem to be there anymore.

Admittedly it's been awhile since I last worked with it. I'll have to see if I've got it locally somewhere.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic