I had the same problem and found out that I was missing the gdata-
photos-meta-1.0.jar file from the classpath. Before I added this jar,
I got null values back from getAdaptedEntry().

On 27 Apr, 20:33, Jeff Fisher <[email protected]> wrote:
> Fix discussed in the bug:
>
> http://code.google.com/p/gdata-issues/issues/detail?id=1175
>
> Basically: never, ever call getEntries() directly.
>
>
>
> On Sat, Apr 25, 2009 at 9:34 AM, David Xia <[email protected]> wrote:
>
> > This is about gdata-samples.java-1.30.0.java, specifically,
> > samples.photos.PicasawebClient, function getAlbums(String username).
>
> > I can create photo album with Albums API, and I can manually create
> > albums.  But I can not list these albums with Albums API, and
> > therefore I can not insert pictures with albums API.  I traced the
> > code and the following is what I found in the code:
>
> > /**
> >   * Retrieves the albums for the given user.
> >   */
> >  public List<AlbumEntry> getAlbums(String username) throws
> > IOException,
> >      ServiceException {
>
> >    String albumUrl = API_PREFIX + username;
> >    //albumUrl = "http://picasaweb.google.com/david.ming.xia";;
> >    UserFeed userFeed = getFeed(albumUrl, UserFeed.class);
>
> >    List<GphotoEntry> entries = userFeed.getEntries();
> > <-------------- Here I got two entries, exactly as what I have.
> >    List<AlbumEntry> albums = new ArrayList<AlbumEntry>();
> >    for (GphotoEntry entry : entries) {
> >      GphotoEntry adapted = entry.getAdaptedEntry();  <--------------
> > Here adapted is actually a null object.
>
> >      if (adapted instanceof AlbumEntry) {
> >        albums.add((AlbumEntry) adapted);
> >      }
> >    }
> >    return
> > albums;
> > <------------------- This list is of 0 in size.
> >  }
>
> > So the problem is on getAdaptedEntry().
>
> > I would appreciate if someone can give me some help.
>
> > Thank you very much.
>
> > David

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums 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-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to