views:

38

answers:

3

I have a small test App running on GAE under the default free quota. It runs fine locally. When deployed on GAE (appspot), some parts of it do not work. Appspot dashboard does not show any error in the logs. Added code to trap quota limits is not triggered. Why is there a variation between the App running locally, versus failing when uploaded? There are no server error screens when deployed, only non-responsive buttons. (One non-responsive html form submit button, which works fine locally.) I am using Eclipse to run the App locally and also to deploy the same identical code.

The Appspot log is below. The *.jsp script getmoreinputs.jsp is supposed to collect data from a form, upon submit, it is supposed to trigger a servlet named /Calculate. The servlet works perfectly when tested locally, but is not triggered in the live deployment.

Any help would be appreciated.

#

1. 08-22 07:57PM 12.475 /getmoreinputs.jsp?cp=true&iv=true 200 23ms 16cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe) See details

  98.236.17.99 - - [22/Aug/2010:19:57:12 -0700] "GET /getmoreinputs.jsp?cp=true&iv=true HTTP/1.1" 200 923 "http://black-scholes.appspot.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe)" "black-scholes.appspot.com" ms=23 cpu_ms=17 api_cpu_ms=0 cpm_usd=0.000615
A: 

As I mentioned in my answer to your previous question: Check your urls are not having a double slash ('//') e.g. /user//listall. This works on dev server but not when you deploy it on app engine.

What I meant by this was, even if your url may not directly show a // , after appending the url suffix to the hostname this is pretty much possible. So I suggest you to try getmoreinputs.jsp instead of /getmoreinputs.jsp (note the '/' removed).

I suspect when this is being appended internally to http://black-scholes.appspot.com/ it is creating a url which looks like http://black-scholes.appspot.com//getmoreinputs.jsp which will not work on app engine when deployed. However this works on the dev server locally. Please give a try.

Gopi
A: 

Hi Gopi: Thanks for your prompt attention. I had no "//" in my *.java and *.jsp code, only single '/'. Based on your suggestion, I removed that single '/' in all the code, wherever there was a submit or redirect clause. It continues to work perfectly in the local environment, and continues to be nonresponsive to the form submit button in the live deployment on GAE.

There are no error messages in the GAE logs. The form simply does not process on submitting. Maybe there is some timeout that occurs on a free quota account that does not throw errors. I have placed error-capturing code for timeout and that is not triggered.

GAE seems to be an ambitious project. Its undiagnosed variance between local test and actual deployment is a disappointment. It is shocking that no error messages are produced upon deployment, only non-response. The product GAE seems to have Microsoft problems.

---- Joe

Joe Smallman
Hi Joe, thanks for giving a try. I had faced exactly similar issue which got resolved when I removed the extra '/' but in your case the cause seems to be something different. I know its really hard to find out especially when there are no logs.Anyways, just as an SO convention - this answer should come as a comment to my answer.
Gopi
+1  A: 

Hi Gopi: My test of your insight suggests: GAE is indifferent to / or // in pathname for submit=

When all else fails, try occult methods. Without any change to code, I complied the GAE App with a new version number. Then I went to Appspot dashboard and deleted the old version (which was not working). Amazing! The deployment of the new version worked perfecly, exactly as the local run. There was no change to the code.

GAE has problems. When deployment != Local, my new rule is: clean out all old versions at deployment site. In my case, I had only 1 old version.

Joe

Joe Smallman
Good to know you finally found a solution ! Thanks for posting it here and now you should accept your own answer by selecting the 'tick' sign near your answer.
Gopi