Re: [appengine-java] Re: Reading a Google Doc from google app engine code
Hie Amit Thanks however when i read the input stream using: String content = CharStreams.toString(new InputStreamReader(inStream)); It prints all boxed characters rather plain english text. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Fri, Nov 11, 2011 at 5:46 PM, Amit Pandey wrote: > Mistakenly send wrong code. Here is correct code. > > On Fri, Nov 11, 2011 at 5:35 PM, Amit Pandey wrote: > >> Hi ViK, >> >> I did the same before and I use *org.apache.poi.hwpf.HWPFDocument* API. >> Following code snippet may be useful for you. Let me know if this works. >> >> for (DocumentListEntry entry : resultFeed.getEntries()) { >> >> String docId = entry.getDocId(); >> String docType = entry.getType(); >> URL exportUrl = >> new URL("https://docs.google.com/feeds/download/"; + docType >> + "s/Export?docID=" + docId + "&exportFormat=doc"); >> MediaContent mc = new MediaContent(); >> mc.setUri(exportUrl.toString()); >> MediaSource ms = client.getMedia(mc); >> InputStream inStream = ms.getInputStream(); >> // Now read the content from input stream. >> break; >> >> } >> >> Thanks, >> Amit >> >> On Thu, Nov 10, 2011 at 4:09 PM, Vik wrote: >> >>> Hie >>> >>> Thanks I went through it and could at least get the handle to the google >>> text doc i needed. I am now stuck at how to read the contents. >>> My code looks like: >>> >>> >>> GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters(); >>> oauthParameters.setOAuthConsumerKey(Constants.CONSUMER_KEY); >>> oauthParameters.setOAuthConsumerSecret(Constants.CONSUMER_SECRET); >>> oauthParameters.setOAuthToken(Constants.ACCESS_TOKEN); >>> oauthParameters.setOAuthTokenSecret(Constants.ACCESS_TOKEN_SECRET); >>> DocsService client = new DocsService("sakshum-YourAppName-v1"); >>> client.setOAuthCredentials(oauthParameters, new >>> OAuthHmacSha1Signer()); >>> URL feedUrl = new URL(" >>> https://docs.google.com/feeds/default/private/full/";); >>> DocumentQuery dquery = new DocumentQuery(feedUrl); >>> dquery.setTitleQuery("blood_donor_verification_template_dev"); >>> dquery.setTitleExact(true); >>> dquery.setMaxResults(10); >>> DocumentListFeed resultFeed = client.getFeed(dquery, >>> DocumentListFeed.class); >>> System.out.println("feed size:" + resultFeed.getEntries().size()); >>> String emailBody = ""; >>> for (DocumentListEntry entry : resultFeed.getEntries()) { >>> System.out.println(entry.getPlainTextContent()); >>> emailBody = entry.getPlainTextContent(); >>> } >>> >>> Plz note that entry.getPlainTextContent() does not work and throws >>> object not TextContent type exception >>> >>> Thankx and Regards >>> >>> Vik >>> Founder >>> http://www.sakshum.org >>> http://blog.sakshum.org >>> >>> >>> On Sun, Nov 6, 2011 at 10:24 PM, Vik wrote: >>> Thanks for replying actually i just googled and could not really find matching to my needs. thanks for the pointer this should be helpful. Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Fri, Nov 4, 2011 at 12:01 AM, Ikai Lan (Google) wrote: > Have you read this? What are your thoughts? What have you tried? > > http://code.google.com/apis/documents/ > > Vik, your posts would be a lot more useful if you: > > 1. List what you have tried > 2. Describe what didn't work > 3. Describe what it is you are trying to do > > I like the fact that you keep emails short, but I suspect other people > on this list have tuned you out because you're just not providing enough > information when you ask for help and it's too much detective work for > people who would actually help out otherwise. > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > plus.ikailan.com | twitter.com/ikai > > > > On Thu, Nov 3, 2011 at 10:42 AM, Vik wrote: > >> someone please help on this. >> >> Thankx and Regards >> >> Vik >> Founder >> http://www.sakshum.org >> http://blog.sakshum.org >> >> >> On Mon, Oct 31, 2011 at 7:11 PM, Vik wrote: >> >>> Hie >>> >>> Can someone please guide on how to read a google doc from my gae >>> code? >>> >>> Thankx and Regards >>> >>> Vik >>> Founder >>> http://www.sakshum.org >>> http://blog.sakshum.org >>> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Google App Engine for Java" group. >> To post to this group, send email to >> google-appengine-java@googlegroups.com. >> To unsubscribe from this group, send email to >> google-appengine-java+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/google-appengine-java?hl=en. >> > > -- > You received this message because you are sub
[appengine-java] Re: Upload files through backend
Yep Bruno: you are right!!! I found a problem with multiple file upload: http://code.google.com/p/googleappengine/issues/detail?id=3351&q=upload&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log Do you know any workaround? I am trying to substitute onSubmit the .. with several: .. but I still have some problems .. On Nov 9, 12:37 pm, Bruno Fuster wrote: > Hi, > > You shouldn't have these limitations when using > blobstoreService.createUploadUrl("/upload") > > Att > > > > > > > > > > On Wed, Nov 9, 2011 at 6:34 PM, Miguel wrote: > > Hi everyone, > > I need to upload big files to the Google App Engine blobstore and I > > was thinking about a possible solution .. The problem with the normal > > frontend is the 60 seconds timeout, but from what I understood about > > backends the problem there is that I have to pass from a queue and so > > the client will lose the endpoint with server, am I right? > > Is there a way to pass transparently the upload calls to a backend in > > order to run indefinitely, so that the client can upload also big > > files? > > > Thank you, > > Michele > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to > > google-appengine-java@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. > > -- > Bruno Fuster -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] java.util.ResourceBundle.Control is not supported by Google App Engine's Java runtime environment
Hi, I wanted to use this class and added its import import java.util.ResourceBundle.Control The java.util.ResourceBundle class is on google white list , so can it be that java.util.ResourceBundle.Control is not on the white list? isn't it supposed to be included in the white list if the import java.util.ResourceBundle IS included? ??? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] CreateProcess error=87, The parameter is incorrect
I am using GAEJ version 1.5.5 on Windows 8 Developer's Preview, I got this error - com.google.appengine.tools.admin.JspCompilationException: Failed to compile jsp files. Nov 12, 2011 9:12:15 PM org.apache.jasper.compiler.AntCompiler generateClass SEVERE: Error compiling file: C:\Users\JAMEST~1\AppData\Local\Temp\appcfg4195120066269074494.tmp\WEB-INF\classes\org\apache\jsp\login_jsp.java [javac] Compiling 1 source file Nov 12, 2011 9:12:15 PM org.apache.jasper.compiler.AntCompiler generateClass SEVERE: Javac exception Error running C:\jdk1.6.0_29\bin\javac.exe compiler at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:473) at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:47) at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757) at org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:226) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349) at org.apache.jasper.JspC.processFile(JspC.java:1192) at org.apache.jasper.JspC.execute(JspC.java:1341) at com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:18) Caused by: java.io.IOException: Cannot run program "C:\jdk1.6.0_29\bin\javac.exe": CreateProcess error=87, The parameter is incorrect at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:834) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449) at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:470) ... 8 more Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect at java.lang.ProcessImpl.create(Native Method) Does anyone know what is the reason for this error? Does GAEJ work on Windows 8 (yet)? Thanks. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.