http://code.google.com/p/google-collections/
On Jul 17, 2:21 am, Peter <naveen.ven...@gmail.com> wrote: > Thanks for ur support Eric :) > > Naveen. V > > On Jul 16, 10:59 pm, Eric Bidelman <api.e...@google.com> wrote: > > > > > Google Collections <http://code.google.com/p/google-collections/> version > > 1.0 or higher. This is included in the release package under > > "java/deps/google-collect-1.0-rc2.jar". > > See:http://code.google.com/p/gdata-java-client/wiki/Dependencies > > > <http://code.google.com/p/gdata-java-client/wiki/Dependencies>Eric > > > On Thu, Jul 16, 2009 at 5:16 AM, Peter <naveen.ven...@gmail.com> wrote: > > > > I'm using Netbeans IDE 5.5 and downloaded the zip file from the below > > > URL, > > > >http://gdata-java-client.googlecode.com/files/gdata-samples.java-1.34... > > > > I mounted all the JAR files which reside under gdata/java/lib. > > > > When I run my java file it says > > > > 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 com.adventnet.zc.client.docs.GetGoogleDocs.main > > > (GetGoogleDocs.java:81) > > > 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) > > > ... 4 more > > > Java Result: 1 > > > > Where do I find the correct JAR files? Please help. > > > > Naveen. V > > > > On Jul 14, 10:47 pm, Eric Bidelman <api.e...@google.com> wrote: > > > > Doesn't look like it: > > >http://www.google.com/codesearch?q=getMedia+package:http://gdata-java... > > > \.com&origq=getMedia&btnG=Search+Trunk > > > > > < > > >http://www.google.com/codesearch?q=getMedia+package:http://gdata-java... > > > \.com&origq=getMedia&btnG=Search+Trunk>Are > > > > you using an IDE such as Eclipse? I know getMedia() > > > > is part of the docliust service class (which inherits from > > > > MediaService). > > > > > Do a search for getMedia() and setMediaSource() in this doc to see > > > examples: > > >http://code.google.com/apis/documents/docs/2.0/developers_guide_java.... > > > > > Eric > > > > > On Tue, Jul 14, 2009 at 12:17 AM, Peter <naveen.ven...@gmail.com> wrote: > > > > > > Hi Eric, > > > > > > I included gdata-media-1.0.jar file in the classpath, and imported > > > > > com.google.gdata.data.media.MediaSource; in the java file. > > > > > > The error is "cannot find method SetURI() and getMedia() in > > > > > MediaContent class". So I just want to confirm if these methods are > > > > > removed from > > > > > >http://gdata-java-client.googlecode.com/files/gdata-samples.java-1.34. > > > .. > > > > > > Is there any other way to retrieve the content? > > > > > > Naveen. V > > > > > > On Jul 14, 12:45 am, Eric Bidelman <api.e...@google.com> wrote: > > > > > > Did you include the media jar? > > > > > > > On Mon, Jul 13, 2009 at 9:00 AM, Peter <naveen.ven...@gmail.com> > > > wrote: > > > > > > > > Hi guys, > > > > > > > > I ran into a problem when I try to export document using GData > > > API's. > > > > > > > > I'm using the following Java code to read the contents of the > > > document > > > > > > > as a stream. > > > > > > > > [quote] > > > > > > > > String docType = resourceId.substring(0, > > > resourceId.lastIndexOf > > > > > > > (':')); > > > > > > > String docId = resourceId.substring(resourceId.lastIndexOf > > > > > > > (':') + 1); > > > > > > > > URL exportUrl = new URL("http://docs.google.com/feeds/ > > > > > > > download/" + docType + "s/Export?docID=" + docId + > > > > > > > "&exportFormat=" > > > + > > > > > > > format); > > > > > > > > System.out.println("Exporting document from: " + > > > > > > > exportUrl); > > > > > > > > MediaContent mc = new MediaContent(); > > > > > > > mc.setUri(exportUrl.toString()); > > > > > > > MediaSource ms = service.getMedia(mc); > > > > > > > > InputStream inStream = null; > > > > > > > FileOutputStream outStream = null; > > > > > > > > try { > > > > > > > inStream = ms.getInputStream(); > > > > > > > outStream = new FileOutputStream(filepath); > > > > > > > > int c; > > > > > > > while ((c = inStream.read()) != -1) { > > > > > > > outStream.write(c); > > > > > > > } > > > > > > > } finally { > > > > > > > if (inStream != null) { > > > > > > > inStream.close(); > > > > > > > } > > > > > > > if (outStream != null) { > > > > > > > outStream.flush(); > > > > > > > outStream.close(); > > > > > > > } > > > > > > > } > > > > > > > > [/quote] > > > > > > > > When I compile it says > > > > > > > > init: > > > > > > > deps-jar: > > > > > > > Compiling 1 source file to > > > /home/naveenv/vosrc/connects/zohoconnects/ > > > > > > > ZohoConnects/build/classes > > > > > > > /home/naveenv/contactnaveen/GetGoogleDocs.java:80: cannot find > > > symbol > > > > > > > symbol : method setUri(java.lang.String) > > > > > > > location: class com.google.gdata.data.media.mediarss.MediaContent > > > > > > > mc.setUri(exportUrl.toString()); > > > > > > > /home/naveenv/contactnaveen/GetGoogleDocs.java:81: cannot find > > > symbol > > > > > > > symbol : method getMedia > > > > > > > (com.google.gdata.data.media.mediarss.MediaContent) > > > > > > > location: class com.google.gdata.client.docs.DocsService > > > > > > > MediaSource ms = service.getMedia(mc); > > > > > > > 2 errors > > > > > > > BUILD FAILED (total time: 0 seconds) > > > > > > > > I'm using gdata-samples.java-1.34.0.zip from the following the > > > > > > > URL > > > >http://gdata-java-client.googlecode.com/files/gdata-samples.java-1.34. > > > > > .. > > > > > > > > Are the methods removed in the latest zip file? Is there any other > > > way > > > > > > > to retrieve the content of the document? > > > > > > > Any pointers would be quite helpful. > > > > > > > > TIA > > > > > > > > Naveen. V --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Docs Data APIs" group. To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com To unsubscribe from this group, send email to google-docs-data-apis+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Docs-Data-APIs?hl=en -~----------~----~----~----~------~----~------~--~---