[appengine-java] Re: Problem with Channel API

2011-05-15 Thread Matthew Smalley
Oops forgot the stack trace: (this is from the google appengine log viewer): Uncaught exception from servlet com.google.appengine.api.channel.ChannelFailureException: An unexpected error occurred. at

[appengine-java] Re: Setting Namespace for an entire Request

2011-05-15 Thread Nichole
According to the docs, the namespace is set globally within the app, but you can use it On a per-User Basis for users that are logged in as an example and that user is the tenant. The docs aren't clear, but the namespace must be globally just for that tenant, yes? If that's the case, then you

[appengine-java] Re: How To: Persist an entity, if and only if, another successfully persists

2011-05-15 Thread Nichole
I like Jeff's solution as it's failsafe, but one more pattern I often use is to set a couple of flags, and complete the 2nd action in a finally clause if needed. The timeout for the 30 sec limit does allow for a very quick transaction to still succeed, so I use that time to persist any state

[appengine-java] Re: App engine SDK jars in WEB-INF/lib. Why???

2011-05-15 Thread Philippe Marschall
On May 13, 2:29 am, Nichole nichole.k...@gmail.com wrote: Just a quick summary, the servlet spec requires that a servlet container such as appengine provider an implementation for a service.  Those jars such as servlet- api-2.4.jar are needed at compile time. That's why there's provided

[appengine-java] how to transfer request to a different servlet ?

2011-05-15 Thread Prashant
hi, i want to use a common servlet (say MainServlet) to handle all the requests and based on url requested i want to transfer request to a different servlet. for example: if requested url is www.mydomain.com/* i want to send request to HomeServlet and if requested url is test.mydomain.com/* i

[appengine-java] Re: Vs: Re: Stripes + UrlBinding + Google App Engine

2011-05-15 Thread Mike Lawrence
sorry you're having problems. dont think this is an app engine issue since many folks use stripes on gae. here are the stripe parts from my web XML ?xml version=1.0 encoding=utf-8? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee;

[appengine-java] Re: Vs: Re: Stripes + UrlBinding + Google App Engine

2011-05-15 Thread Mike Lawrence
there is no file system in gae so the multipart wrapper could be your problem. it probably would work locally by not in prod On May 15, 8:30 am, Mike Lawrence m...@systemsplanet.com wrote: sorry you're having problems. dont think this is an app engine issue since many folks use stripes on gae.

[appengine-java] Re: Backends.xml ERROR when deploying

2011-05-15 Thread Dennis Lo
I think you need to use a uppercase B for the classes. When I tried deploying using a lowercase b1 eclipse was complating about a volidation with the backends.xsd. Try this: backends backend name=tastBackend classB1/class instances1/instances /backend /backends However, I can

[appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Brandon Donnelson
Do you mean: response.sendRedirect(url); Brandon Donnelson http://gwt-examples.googlecode.com -- 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

[appengine-java] Re: UserService.getCurrentUser() returning null sometimes

2011-05-15 Thread Brandon Donnelson
Dev or Production side? I've had this happen on the dev side at times. I haven't seen it recently in my app. Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Vik
Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing.

Re: [appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Prashant
no, sorry :( . i want (kind of) server side redirect. you can think of a scenario where multiple applications are hosted in a single google appengine app but each app has to respond to its own unique domain. all the applications are handled by a master application. master application will accept

Re: [appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Ravi Sharma
Using Spring MVC you could use it to solve the problem. Basically you want different Controller for http://www.mainsite.com and http://test.mainsite.com I have used it in one of my application. I write all the steps in a blog here. I hope it will helpfull

Re: [appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Prashant
thanks a lot Ravi. i will read your article and give it a try On Sun, May 15, 2011 at 8:20 PM, Ravi Sharma ping2r...@gmail.com wrote: Using Spring MVC you could use it to solve the problem. Basically you want different Controller for http://www.mainsite.com and http://test.mainsite.com

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Vik
Hie Stephon Still I am not sure on the part that ultimately how will i use this stream to attach the generated pdf as an attachment in the email. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson

Re: [appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Stephen Johnson
You should be able to use the RequestDispatcher object to do what you want but you'll have to have mappings in web.xml for each of the servlets your forwarding to for instance MyGalleryApp would have mappings that all start with /MyGalleryApp/ (or something similar) so GalleryServlet would map to

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
Hi Vik, Call toByteArray() method on ByteArrayOutputStream when finished with creating PDF and then MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(whatever.pdf); attachment.setContent(attachmentData, application/pdf);

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Vik
Thanks 2 futher things 1. What is the link between toByteArray() and attachment part of the code? I mean i do not see the byteArray being used anywhere in the code you provided. 2. Servlet response is giving ServletResponseOutputStream and on googling i did not find a way to convert it to

[appengine-java] Re: Backends.xml ERROR when deploying

2011-05-15 Thread JakeP
Dennis, You're half-way there :) GAE won't create a backend for you until you use the appcfg.sh 'update' command to update the backends. Check out the docs here: http://code.google.com/appengine/docs/java/backends/overview.html#Commands I also was really expecting the backends.xml file

Re: [appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Prashant
thanks Ravi and Stephen for your responses. my application needs to do mapping at run time, i.e. it wouldn't be knowing how may subdomains it would be handling, so, i can't not use your techniques :( On Sun, May 15, 2011 at 10:13 PM, Stephen Johnson onepagewo...@gmail.comwrote: You should be

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
The code snippet is from the link I provided. Replace the attachmentData in the code snippet with the byte[] array returned from toByteArray(). You do not convert the ServletResponseOutputStream to a ByteArrayOutputStream. Create your own ByteArrayOuputStream. You want to send the PDF as an

[appengine-java] Vs: Re: Vs: Re: Stripes + UrlBinding + Google App Engine

2011-05-15 Thread Pauli Savolainen
Hello I did implement an empty mulitpart wrapper as I listed in my previous message so that was not the problem. Fortunately, I did solve my problem. The problem was not in the Stripes configuration at all. I had a following tag in my web.xml: jsp-config jsp-property-group

[appengine-java] Will requests from the same source typically be routed to the same GAE instance?

2011-05-15 Thread Ian Clarke
I'm planning to build a web service on GAE that I anticipate having to deal with significant amounts of load. I therefore want to make full use of memcache such that hopefully, most requests won't need to go to the datastore. There will be several different users of this web service, and each

Re: [appengine-java] Will requests from the same source typically be routed to the same GAE instance?

2011-05-15 Thread Pieter Coucke
memcache is shared between all instances, so there's no need to check this you should also have a look at datastore namespaces On Sunday, May 15, 2011, Ian Clarke ian.cla...@gmail.com wrote: I'm planning to build a web service on GAE that I anticipate having to deal with significant

Re: [appengine-java] Will requests from the same source typically be routed to the same GAE instance?

2011-05-15 Thread Ian Clarke
Thanks Pieter, yes, it sounds like namespaces will solve this problem for me. Ian. -- 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

Re: [appengine-java] Re: Backends.xml ERROR when deploying

2011-05-15 Thread Dennis Lo
Hi Jake, Can you give me the exact command you used? I'm not sure how to use appcfg.sh for the backend features. I'm actually planning to use the affcfg.py (which I believe is the same but just the python version) So what are the dir and [update] values supposed to be to make these backends.xml

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Vik
Thanks a lot Stephen ! I could complete the code and testing now. Your great support will really help our cause to serve the needy. Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, May 15, 2011 at 11:15 PM, Stephen Johnson onepagewo...@gmail.comwrote:

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
Great! Glad to hear you got it working. On Sun, May 15, 2011 at 7:18 PM, Vik vik@gmail.com wrote: Thanks a lot Stephen ! I could complete the code and testing now. Your great support will really help our cause to serve the needy. Thankx and Regards Vik Founder

[appengine-java] TaskOptions bug: params(name, value) called, request received with no parameters

2011-05-15 Thread Nikita Kuznetsov
Get queue, create task, add task to queue: Queue q = QueueFactory.getDefaultQueue(); TaskOptions opts = TaskOptions.Builder.withUrl(some_url); opts.param(some_name, some_value); q.add(opts); The task is executed but HttpServletRequest.getParameterMap().size() == 0 for

Re: [appengine-java] Re: App engine SDK jars in WEB-INF/lib. Why???

2011-05-15 Thread Toby Reyelts
On Sun, May 15, 2011 at 7:58 AM, Philippe Marschall philippe.marsch...@gmail.com wrote: On May 13, 2:29 am, Nichole nichole.k...@gmail.com wrote: Just a quick summary, the servlet spec requires that a servlet container such as appengine provider an implementation for a service. Those

[appengine-java] unable to send a pdf as attachment in mail

2011-05-15 Thread Vik
Hie Trying to send a pdf created using pdfJet throws the exception class javax.mail.SendFailedException:Send failure (javax.mail.MessagingException: Converting attachment data failed) The code is like: MimeBodyPart htmlPart = new MimeBodyPart();

[appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Didier Durand
HI, From the description of your needs, it seems that the Java inheritance mechanism is all what you need. Yours servlets should all inherit from HomeServlet, in their doGet() method, they will just call super.doGet() at the beginning and then execute their own thing. regards didier On May

[appengine-java] Re: TaskOptions bug: params(name, value) called, request received with no parameters

2011-05-15 Thread Nikita Kuznetsov
Rewrote the code: QueueFactory.getDefaultQueue().add(TaskOptions.Builder.withUrl(some_url). param(some_name, some_value). method(TaskOptions.Method.GET)); Works fine now. Method needed to be set or it defaulted to POST and created problems. Disregard piece about it

[appengine-java] Re: Problem with Channel API

2011-05-15 Thread James M
Hi Matthew, In your logging.properties file, can you set the logging level to ALL and see if that gives you more information? I've found that in these cases, it's helpful to see exactly what's going on under the hood, before the stack trace is generated. If it's not clear to you what's going on

[google-appengine] How to force immediate log writes in Java?

2011-05-15 Thread Mike Prince
I have a servlet that works fine in development but crashes the server in production and I'm trying to figure out why. Since the log files seem to be flushed at the end of the HTTP request, and the server is crashing, nothing is written and I'm flying blind. I thought I heard mention of a way to

RE: [google-appengine] How to force immediate log writes in Java?

2011-05-15 Thread Brandon Wirtz
http://code.google.com/intl/en/appengine/docs/java/runtime.html -Original Message- From: google-appengine@googlegroups.com [mailto:google-appengine@googlegroups.com] On Behalf Of Mike Prince Sent: Saturday, May 14, 2011 11:29 PM To: Google App Engine Subject: [google-appengine] How to

Re: RE: [google-appengine] HR applications and Cache Control/Pragma/Expires headers

2011-05-15 Thread Tim
On Sunday, May 15, 2011 2:03:39 AM UTC+1, Brandon Wirtz wrote: And I noticed that SOME Company I won’t name, names…. Every Time they Run an Ad on one of my pages they seem to think they need to send the AD bot, and the Index Bot (twice) to the page, and they always do it with in 3

Re: [google-appengine] Re: 1.5 improvements Make me less scared of Pricing

2011-05-15 Thread Tim
On Saturday, May 14, 2011 8:54:54 PM UTC+1, Robert Kluin wrote: If the data doesn't get updated, using the blobstore might be a good idea. As I recall, you can't update a blob. So if the data changes it may not be the best idea. Of course, it really all depends on the app / usage. Ah -

[google-appengine] Re: What do you want to see answered in Greg's pricing FAQ?

2011-05-15 Thread planetjones
I would like to see: a) Is Google now concentrating solely on the enterprise and, with this latest release, effectively stating that App Engine is not a viable platform for college students, part-time hackers and enthusiasts to develop on? b) Should Google have communicated the fact that pricing

[google-appengine] Re: Numbers that don't quite add Up?

2011-05-15 Thread Dale
Would suggest you star this issue http://code.google.com/p/googleappengine/issues/detail?id=2740 to include indexes in datastore stats. On May 15, 6:50 am, Stephen Johnson onepagewo...@gmail.com wrote: Well, the Datastore Statistics don't add in any indexing, etc. whereas the quota details

[google-appengine] Charging for memory using Megabyte.hours

2011-05-15 Thread Dale
According to Ikai and other Googlers a very real cost to GAE is the memory consumption of apps that don't use a lot of CPU but still have active instances. So why not add a charge for memory usage x time? If one instance used 20 MB for 24 hours it would consume 480 MB.hours. Instance.hours hides

Re: [google-appengine] Charging for memory using Megabyte.hours

2011-05-15 Thread Vinuth Madinur
+1. Very sensible and appengine like. On Sun, May 15, 2011 at 7:21 PM, Dale dalehu...@gmail.com wrote: According to Ikai and other Googlers a very real cost to GAE is the memory consumption of apps that don't use a lot of CPU but still have active instances. So why not add a charge for

[google-appengine] Re: Charging for memory using Megabyte.hours

2011-05-15 Thread Luís Marques
That is indeed an interesting suggestion, but I suspect it might be unworkable at that granularity. If you have an idle instance occupying 20 MB of a 128 MB instance class, GAE can't make use of the remaining 108 MB without restrictions. If your instance suddenly needs more than 20 MB to process

[google-appengine] Where did Google buy 4.8GHz CPUs?

2011-05-15 Thread pdknsk
Or is this just against some sort of Pentium = 100 reference value? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to

[google-appengine] Re: Charging for memory using Megabyte.hours

2011-05-15 Thread pdknsk
I very much agree with this suggestion. I've put the heavy lifting on backends, and frontends merely serve simple requests now with only about 10MB memory usage, but would still be charged the same amount as instances using 128MB. Maybe Google could provide mini-instances, which have a hard limit

[google-appengine] Re: Invalid runtime or the current user is not authorized to use it. Go language

2011-05-15 Thread Oren Robinson
I have this same error. I was following along the Go SDK tutorial, and was unable to upload following these instructionshttp://code.google.com/appengine/docs/go/gettingstarted/uploading.html . Ubuntu 10.10 32-bit First attempt it prompted me for a password, but successive attempts did not.

Re: [google-appengine] Re: Charging for memory using Megabyte.hours

2011-05-15 Thread Vinuth Madinur
2011/5/15 Luís Marques luismarq...@gmail.com That is indeed an interesting suggestion, but I suspect it might be unworkable at that granularity. If you have an idle instance occupying 20 MB of a 128 MB instance class, GAE can't make use of the remaining 108 MB without restrictions. If your

Re: [google-appengine] Where did Google buy 4.8GHz CPUs?

2011-05-15 Thread Nickolas Daskalou
They're not 4.8GHz. It's more like 2 x 2.4GHz which can only be utilised (currently) by using the Java runtime of GAE, as stated by Greg Darke here: https://groups.google.com/d/msg/google-appengine/z-A6PcplG7M/O-Ke_SVMXoMJ Nick On 16 May 2011 02:29, pdknsk pdk...@googlemail.com wrote: Or is

[google-appengine] Re: Question about dynamic backends

2011-05-15 Thread pdknsk
Thanks for the clarification. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to

Re: [google-appengine] How can I block bot which do not follow robots.txt ?

2011-05-15 Thread Stephen
On Sat, May 14, 2011 at 6:12 AM, Gopal Patel patelgo...@gmail.com wrote: there is exabot crawler crawling my unfinished website continuouslywhat can I do to stop it ? I have disallowed everything in robot.txt . That should be robots.txt, with an 's'. They claim it respects robots.txt:

RE: [google-appengine] Where did Google buy 4.8GHz CPUs?

2011-05-15 Thread Brandon Wirtz
Just for the record, the i5 in my computer is running at 5.2Ghz on 2 Cores, and 1.3Ghz on 2 cores. This is great for things that only use 2 threads the OS runs on a 1.3ghz CPU, background tasks run on a 1.3, and my video editing software runs on the 2 5.2ghz cores. I realize this isn't what

Re: [google-appengine] Re: What do you want to see answered in Greg's pricing FAQ?

2011-05-15 Thread Will
My question: Is it responsible and justified for a company like Google to make a drastic price increase on GAE after so many have invested time and resources on it in the past three years? The emphasis here is 'a company like Google'. Speaking for myself, I believe in Google, both technical and

[google-appengine] Re: What's going on with my CPU times

2011-05-15 Thread stevep
Thanks Brandon, I probably mis-communicated. I'm not doing any image manipulation. On- line handler receives the jpeg bytes posted by client and saves them in a db.BlobProperty entity property. When the call for the jpeg comes in, handler simply does a get_by_id, and writes out the

[google-appengine] Re: Charging for memory using Megabyte.hours

2011-05-15 Thread nickmilon
+ 1 to more granularity in every way possible. 15 minutes looks more like IaaS not PaaS. Nick On May 15, 8:02 pm, Vinuth Madinur vinuth.madi...@gmail.com wrote: 2011/5/15 Luís Marques luismarq...@gmail.com That is indeed an interesting suggestion, but I suspect it might be unworkable at

[google-appengine] New Datastore API per operation???

2011-05-15 Thread blue
The new pricing model says this: Datastore API50k operations$0.01 / 10k operations Is this really $0.1 per operation? Is there any entity size factors etc? I'm trying to design my app accordingly and seem to be reading conflicting things. If it is really a static $0.1 per read or

RE: [google-appengine] New Datastore API per operation???

2011-05-15 Thread Brandon Wirtz
I don't think we fully know yet. Sweet is relative. My code reads as API this, API That, API a Third Thing, Response.write if anything errored log it. You still have to pay for the CPU time while the API stuff happens. So it's not quite as cheap as all that. From:

Re: [google-appengine] Re: What's going on with my CPU times

2011-05-15 Thread Robert Kluin
Hey Steve, I see something similar since I've enabled always on. But in my case it seems to be much less extreme. Appstats numbers are more-or-less consistent between the two requests, clearly there is something going on here. The really funny thing is that the CPU ms number is higher than

[google-appengine] Re: Possible to Defer Tasks to Backend

2011-05-15 Thread Aaron
Hi Greg, I'm having trouble figuring out the exact syntax for deferring tasks to a backend. When I try to use the following syntax: deferred.defer(PullReport,userkey,dates,_queue=googleanalytics,_target='processga') I get the following error: TypeError: PullReport() got an unexpected keyword

[google-appengine] Dynamic urls

2011-05-15 Thread Phil McDonnell
I have an app that contains a number of products. I want these individual product pages to SEO well. So for instance, I want to mysite.com/mini-shop-vac to be the url for my product that is titled Mini Shop Vac. I have about a thousand products and my inventory is always being updated. I know

Re: [google-appengine] Dynamic urls

2011-05-15 Thread Stephen Johnson
I would have all products have a URL pattern like mysite.com/product/mini-shop-vac (or similar). Then, map mysite.com/product/* to a ProductServlet or similar that generates the product page. You can find out what product they are viewing by using getRequestURI() method and stripping off the

Re: [google-appengine] Dynamic urls

2011-05-15 Thread James Broberg
You might like to consider Restlets [1] as well - they are well suited to this sort of routing and dynamic naming. [1] http://www.restlet.org/ On 16 May 2011 10:28, Stephen Johnson onepagewo...@gmail.com wrote: I would have all products have a URL pattern like mysite.com/product/mini-shop-vac