ektfetna1 / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
1 stars 0 forks source link

Maps samples do not work 1.47.1 #403

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

All sample maps applications fail to run.

What steps will reproduce the problem?
1. Installed latest version, 1.47.1
2. Added Mail 1.4.5 and Guava 13.0.1 (both latest)
3. Run Samples program for maps, ListMaps.java for example.
4. All fail with same error;

com.google.gdata.util.ParseException: [Line 1, Column 1189, element name] name 
must have a value
a value
    at com.google.gdata.util.XmlParser.throwParseException(XmlParser.java:739)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:702)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:585)
    at com.google.gdata.data.BaseFeed.parseAtom(BaseFeed.java:867)
    at com.google.gdata.wireformats.input.AtomDataParser.parse(AtomDataParser.java:68)
    at com.google.gdata.wireformats.input.AtomDataParser.parse(AtomDataParser.java:39)
    at com.google.gdata.wireformats.input.CharacterParser.parse(CharacterParser.java:100)
    at com.google.gdata.wireformats.input.XmlInputParser.parse(XmlInputParser.java:52)
    at com.google.gdata.wireformats.input.AtomDualParser.parse(AtomDualParser.java:66)
    at com.google.gdata.wireformats.input.AtomDualParser.parse(AtomDualParser.java:34)
    at com.google.gdata.client.Service.parseResponseData(Service.java:2165)
    at com.google.gdata.client.Service.parseResponseData(Service.java:2098)
    at com.google.gdata.client.Service.getFeed(Service.java:1136)
    at com.google.gdata.client.Service.getFeed(Service.java:998)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:645)
    at com.google.gdata.client.Service.getFeed(Service.java:1017)
    at com.dunlops.maps.ListMaps.printUserMaps(ListMaps.java:63)
    at com.dunlops.maps.ListMaps.main(ListMaps.java:47)
Caused by: com.google.gdata.util.ParseException: name must have a value
    at com.google.gdata.data.Person$AtomHandler$NameHandler.processEndElement(Person.java:251)
    at com.google.gdata.util.XmlParser.endElement(XmlParser.java:1013)
    at org.xml.sax.helpers.ParserAdapter.endElement(ParserAdapter.java:626)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:593)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:405)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:694)
    ... 16 more
BUILD SUCCESSFUL (total time: 1 second)

What version of the product are you using? On what operating system?
JDK 1.6.0_27, Windows 7 Pro

I have a valid and working login to maps in test test application. Since I 
created a application specific password and can see this is being used in my 
account area.

Sample java file being used (from samples section);

/* Copyright (c) 2008 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import com.google.gdata.client.*;
import com.google.gdata.client.maps.*;
import com.google.gdata.data.*;
import com.google.gdata.data.maps.*;
import com.google.gdata.util.*;
import java.io.IOException;
import java.net.URL;

public class ListMaps {

  public static void main(String[] args) {
    MapsService myService = new MapsService("listAllMaps");
    try {
     // Replace username and password with your authentication credentials
      myService.setUserCredentials("<removed>","<removed>");
      printUserMaps(myService);
    } catch(AuthenticationException e) {
      System.out.println("Authentication Exception");
    } catch(ServiceException e) {
      System.out.println("Service Exception: " + e.getMessage());
      e.printStackTrace();
    } catch(IOException e) {
      System.out.println("I/O Exception: ");
    }
  }

  public static void printUserMaps(MapsService myService)
    throws ServiceException, IOException {

    // Request the default metafeed
    final URL feedUrl = new URL("http://maps.google.com/maps/feeds/maps/default/full");
    MapFeed resultFeed = myService.getFeed(feedUrl, MapFeed.class);

    // Iterate through results and print out title,summary,self and edit links

    for (int i = 0; i < resultFeed.getEntries().size(); i++) {
      MapEntry entry = resultFeed.getEntries().get(i);
      System.out.println("\t" + entry.getTitle().getPlainText());
      System.out.println("\t" + entry.getSummary().getPlainText());
      System.out.println("Self link: " + entry.getSelfLink().getHref());
      System.out.println("Edit link: " + entry.getEditLink().getHref());
      try {
        System.out.println("Feature Feed: " + entry.getFeedLink().getHref());
      } catch (NullPointerException e) {
        System.out.println("Null features: ");
      }
    }
  }
}

Original issue reported on code.google.com by mich...@jixel.com on 6 Sep 2012 at 2:20