[appengine-java] datastore request returning the previous result...
Ive implemented the stockwatcher application and have adjusted it so that it stores names and phone numbers. That all seems to be working ok, however Ive now implemented a "get" function which looks for a name, and returns a phone number. However, whats happening is that the first search i do returns nothing, then if i search for the same name again, then it returns the correct phone number, then if i search for another name, it returns the first name's phone instead. eg I have the following data in the datastore: john paul i request the phone number for john and i get back "" I request the phone number for paul and i get back "" I request the phone number for john and i get back "" Client side Java file contains: private String GetOneContact(String Name) { ContactService = GWT.create(ContactService.class); ContactService.getoneContact(Name,new AsyncCallback() { public void onFailure(Throwable error) { PhoneResult="ERROR"; } public void onSuccess(String Phone) { PhoneResult=Phone; } }); return (PhoneResult); } Server side (ContactServiceImpl.java) contains: public String getoneContact(String Name) throws NotLoggedInException { checkLoggedIn(); String Phone="x"; PersistenceManager pm = getPersistenceManager(); try { //Query q = pm.newQuery(Contact.class, "user == u && Name==n"); Query q = pm.newQuery(Contact.class, "user == u"); q.declareParameters("com.google.appengine.api.users.User u"); //q.declareParameters("John n"); List Contacts = (List) q.execute(getUser ()); for (Contact contact : Contacts) { if (Name.equals(contact.getName())) {Phone=contact.getPhone ();} } } finally { pm.close(); } return (Phone); } --~--~-~--~~~---~--~~ 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] Re: datastore request returning the previous result...
OK, after a little further investigation Ive confirmed now that the client side function is taking in the correct search name, the problem is certainly that the server side appears to be receiving the previous request. Ive changed the returns in both functions such that i now get the following: john:null paul:(john)john: john:(paul)paul: where the format is: input to client function : (input to server function):name of found contact from query:phone of found contact from query Thanks, John On Aug 25, 6:23 pm, John V Denley wrote: > Ive implemented the stockwatcher application and have adjusted it so > that it stores names and phone numbers. That all seems to be working > ok, however Ive now implemented a "get" function which looks for a > name, and returns a phone number. However, whats happening is that the > first search i do returns nothing, then if i search for the same name > again, then it returns the correct phone number, then if i search for > another name, it returns the first name's phone instead. > > eg I have the following data in the datastore: > > john > paul > > i request the phone number for john and i get back "" > I request the phone number for paul and i get back "" > I request the phone number for john and i get back "" > > Client side Java file contains: > > private String GetOneContact(String Name) { > ContactService = GWT.create(ContactService.class); > ContactService.getoneContact(Name,new AsyncCallback() > { > public void onFailure(Throwable error) { > PhoneResult="ERROR"; > } > public void onSuccess(String Phone) { > PhoneResult=Phone; > } > }); > return (PhoneResult); > } > > Server side (ContactServiceImpl.java) contains: > > public String getoneContact(String Name) throws NotLoggedInException > { > checkLoggedIn(); > String Phone="x"; > PersistenceManager pm = getPersistenceManager(); > try { > //Query q = pm.newQuery(Contact.class, "user == u && > Name==n"); > Query q = pm.newQuery(Contact.class, "user == u"); > q.declareParameters("com.google.appengine.api.users.User u"); > //q.declareParameters("John n"); > List Contacts = (List) q.execute(getUser > ()); > for (Contact contact : Contacts) { > if (Name.equals(contact.getName())) > {Phone=contact.getPhone > ();} > } > > } finally { > pm.close(); > } > return (Phone); > } --~--~-~--~~~---~--~~ 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] Re: datastore request returning the previous result...
A, after some investigation, looks like what im doing is initiating an asynchronous request to the server, and then not waiting long enough for the reply, hence why im getting the reply whenever i make the second request Can anyone tell me how i can make sure i get the reply ive asked for? what am i missing here? Thanks, John On Aug 25, 7:30 pm, John V Denley wrote: > OK, after a little further investigation Ive confirmed now that the > client side function is taking in the correct search name, the problem > is certainly that the server side appears to be receiving the previous > request. > > Ive changed the returns in both functions such that i now get the > following: > > john:null > paul:(john)john: > john:(paul)paul: > > where the format is: > input to client function : (input to server function):name of found > contact from query:phone of found contact from query > > Thanks, > John > > On Aug 25, 6:23 pm, John V Denley wrote: > > > Ive implemented the stockwatcher application and have adjusted it so > > that it stores names and phone numbers. That all seems to be working > > ok, however Ive now implemented a "get" function which looks for a > > name, and returns a phone number. However, whats happening is that the > > first search i do returns nothing, then if i search for the same name > > again, then it returns the correct phone number, then if i search for > > another name, it returns the first name's phone instead. > > > eg I have the following data in the datastore: > > > john > > paul > > > i request the phone number for john and i get back "" > > I request the phone number for paul and i get back "" > > I request the phone number for john and i get back "" > > > Client side Java file contains: > > > private String GetOneContact(String Name) { > > ContactService = GWT.create(ContactService.class); > > ContactService.getoneContact(Name,new AsyncCallback() > > { > > public void onFailure(Throwable error) { > > PhoneResult="ERROR"; > > } > > public void onSuccess(String Phone) { > > PhoneResult=Phone; > > } > > }); > > return (PhoneResult); > > } > > > Server side (ContactServiceImpl.java) contains: > > > public String getoneContact(String Name) throws NotLoggedInException > > { > > checkLoggedIn(); > > String Phone="x"; > > PersistenceManager pm = getPersistenceManager(); > > try { > > //Query q = pm.newQuery(Contact.class, "user == u && > > Name==n"); > > Query q = pm.newQuery(Contact.class, "user == u"); > > q.declareParameters("com.google.appengine.api.users.User > > u"); > > //q.declareParameters("John n"); > > List Contacts = (List) q.execute(getUser > > ()); > > for (Contact contact : Contacts) { > > if (Name.equals(contact.getName())) > > {Phone=contact.getPhone > > ();} > > } > > > } finally { > > pm.close(); > > } > > return (Phone); > > } --~--~-~--~~~---~--~~ 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] why is my asynccallback not working?
The following code returns "null" the first time it is run, and then returns the previous request on the second time it is called can anyone see whats going wrong? Surely it should wait until it gets the server response before returning a value? or am I missing the point here? private String GetOneContact(String Name) { //ContactService = GWT.create(ContactService.class); ContactService.getoneContact(Name,new AsyncCallback() { public void onFailure(Throwable error) { PhoneResult="ERROR"; } public void onSuccess(String Phone) { PhoneResult=Phone; } }); return (Phone); } --~--~-~--~~~---~--~~ 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] Re: why is my asynccallback not working?
Brilliant Toby, thats exactly what I was missing, I kind of knew what was going on, but couldnt work out WHERE I was going wrong. This is the problem with coming from a functional (pure C) programming background, Im really struggling with all this stuff happening at the same time malarky! I was thinking it was a GAE question because im trying to send data to and from the datastore, again because im using both GWT and GAE, its hard to figure out where one stops and the other starts! Thanks anyway, perfect response :D you are a star! Hopefully once Ive fixed the way it works, it will just start working and i wont need anymore help with this particular issue anyway! On Aug 25, 11:30 pm, Toby Reyelts wrote: > This is more of a GWT question than a GAE question, but I agree that you're > missing the point. An async callback is executed asynchronously (hence the > name), and it looks like you're trying to treat it as if it happens > synchronously: > > ContactService.getoneContact(String Name,new AsyncCallback()> > { > public void onFailure(Throwable error) { > PhoneResult="ERROR"; > } > public void onSuccess(String Phone) { > // This code is not executed until after the server returns a > response. > // You need to put the code that handles the response here - > such as posting an event, updating the UI, or otherwise dealing with the > results. > PhoneResult=Phone; > } > }); > > // This code executes immediately after the RPC begins and almost > guaranteed before it completes. Don't write code that depends upon the RPC > having completed here. > return (Phone); > > On Tue, Aug 25, 2009 at 5:57 PM, John V Denley > wrote: > > > > > The following code returns "null" the first time it is run, and then > > returns the previous request on the second time it is called can > > anyone see whats going wrong? Surely it should wait until it gets the > > server response before returning a value? or am I missing the point > > here? > > > private String GetOneContact(String Name) { > > //ContactService = GWT.create(ContactService.class); > > ContactService.getoneContact(Name,new AsyncCallback() > > { > > > public void onFailure(Throwable error) { > > PhoneResult="ERROR"; > > } > > public void onSuccess(String Phone) { > > PhoneResult=Phone; > > } > > }); > > return (Phone); > > } --~--~-~--~~~---~--~~ 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] Re: datastore request returning the previous result...
I have had a reply to another thread which indicated that I had misunderstood how the coding for ths async call was working... I include the explaination below for completeness, incase anyone else has the same problem. and finds this thread rather than my other thread!! > > > private String GetOneContact(String Name) { > > > ContactService = GWT.create(ContactService.class); > > > ContactService.getoneContact(Name,new AsyncCallback() > > > { > > > public void onFailure(Throwable error) { > > > PhoneResult="ERROR"; > > > } > > > public void onSuccess(String Phone) { > > > PhoneResult=Phone; ***This area of the code is what happens immediately after the asynccallback completes successfully > > > } > > > }); > > > return (PhoneResult); ***This area of the code actually gets executed immediately after the AsyncCallback is initiated, and as such can happen before the code above!! > > > } On Aug 25, 10:35 pm, John V Denley wrote: > A, after some investigation, looks like what im doing is > initiating an asynchronous request to the server, and then not waiting > long enough for the reply, hence why im getting the reply whenever i > make the second request > > Can anyone tell me how i can make sure i get the reply ive asked for? > what am i missing here? > > Thanks, > John > > On Aug 25, 7:30 pm, John V Denley wrote: > > > OK, after a little further investigation Ive confirmed now that the > > client side function is taking in the correct search name, the problem > > is certainly that the server side appears to be receiving the previous > > request. > > > Ive changed the returns in both functions such that i now get the > > following: > > > john:null > > paul:(john)john: > > john:(paul)paul: > > > where the format is: > > input to client function : (input to server function):name of found > > contact from query:phone of found contact from query > > > Thanks, > > John > > > On Aug 25, 6:23 pm, John V Denley wrote: > > > > Ive implemented the stockwatcher application and have adjusted it so > > > that it stores names and phone numbers. That all seems to be working > > > ok, however Ive now implemented a "get" function which looks for a > > > name, and returns a phone number. However, whats happening is that the > > > first search i do returns nothing, then if i search for the same name > > > again, then it returns the correct phone number, then if i search for > > > another name, it returns the first name's phone instead. > > > > eg I have the following data in the datastore: > > > > john > > > paul > > > > i request the phone number for john and i get back "" > > > I request the phone number for paul and i get back "" > > > I request the phone number for john and i get back "" > > > > Client side Java file contains: > > > > private String GetOneContact(String Name) { > > > ContactService = GWT.create(ContactService.class); > > > ContactService.getoneContact(Name,new AsyncCallback() > > > { > > > public void onFailure(Throwable error) { > > > PhoneResult="ERROR"; > > > } > > > public void onSuccess(String Phone) { > > > PhoneResult=Phone; > > > } > > > }); > > > return (PhoneResult); > > > } > > > > Server side (ContactServiceImpl.java) contains: > > > > public String getoneContact(String Name) throws NotLoggedInException > > > { > > > checkLoggedIn(); > > > String Phone="x"; > > > PersistenceManager pm = getPersistenceManager(); > > > try { > > > //Query q = pm.newQuery(Contact.class, "user == u && > > > Name==n"); > > > Query q = pm.newQuery(Contact.class, "user == u"); > > > q.declareParameters("com.google.appengine.api.users.User > > > u"); > > > //q.declareParameters("John n"); > > > List Contacts = (List) q.execute(getUser > > > ()); > > > for (Contact contact : Contacts) { > > > if (Name.equals(contact.getName())) > > > {Phone=contact.getPhone > > > ();} > > > } > > > > } finally { > > > pm.close(); > > > } > > > return (Phone); > > > } --~--~-~--~~~---~--~~ 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] why dont my two longs equal each other?
OK so Im sending in an ID number (Long) and Im doing a query on the datastore, getting all the "contacts" in the database, using the "getID" function to get the "StoredID" and comparing the ID's. However for some reason the boolean "test" below never becomes true, despite after stepping through the program there are times when StoredID=16 and ID=16, but yet (StoredID==ID) does not evaluate to "true" anyone got any ideas? public String updateContact(Long AdminID, Long ID, String Name,String Phone, String KnownAs, String Notes) throws NotLoggedInException { Contact ContactToUpdate=null; Long StoredID; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query q = pm.newQuery(Contact.class, "AdminID == AID"); q.declareParameters("Long AID"); List Contacts = (List) q.execute(AdminID); for (Contact contact : Contacts) { StoredID=contact.getID(); boolean test=(StoredID==ID); if (test) { ContactToUpdate=contact; } else { ContactToUpdate=null; } } } finally { pm.close(); } } --~--~-~--~~~---~--~~ 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] Re: why dont my two longs equal each other?
AHHH, that actually explains a lot of other problems I have been seeing with "Long" that i wasnt expecting so why would anyone use Long rather than long? Im guessing that long is actually a basic datatype I suppose I can go look that up myself though! Thanks for your help and input... I wish id figured that out at about midnight last night, I could have gone to bed 4 hours earlier!!! LOL On Oct 21, 3:44 am, nclemeur wrote: > Just use > StoredID.equals(ID) > > These are objects in Java, so you need to use equals (or > StoreID.longValue==ID.longValue) > > Cheers > > Nicolas > > On Oct 21, 12:39 pm, John VDenley wrote: > > > OK so Im sending in an ID number (Long) and Im doing a query on the > > datastore, getting all the "contacts" in the database, using the > > "getID" function to get the "StoredID" and comparing the ID's. > > > However for some reason the boolean "test" below never becomes true, > > despite after stepping through the program there are times when > > StoredID=16 and ID=16, but yet (StoredID==ID) does not evaluate to > > "true" > > > anyone got any ideas? > > > public String updateContact(Long AdminID, Long ID, String > > Name,String Phone, String KnownAs, String Notes) throws > > NotLoggedInException { > > > Contact ContactToUpdate=null; > > Long StoredID; > > > PersistenceManager pm = PMF.get().getPersistenceManager(); > > try { > > Query q = pm.newQuery(Contact.class, "AdminID == AID"); > > q.declareParameters("Long AID"); > > List Contacts = (List) q.execute(AdminID); > > for (Contact contact : Contacts) > > { > > > StoredID=contact.getID(); > > boolean test=(StoredID==ID); > > if (test) > > { > > ContactToUpdate=contact; > > } > > else > > { > > ContactToUpdate=null; > > } > > } > > } > > finally > > { > > pm.close(); > > } > > } --~--~-~--~~~---~--~~ 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] Re: why dont my two longs equal each other?
OK I looked it up, more info here http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Long.html for anyone else who wants to know... and I can actually use the following: (StoredID.compareTo(ID)==0) StoredID.equals(ID) Cheers, J On Oct 21, 3:44 am, nclemeur wrote: > Just use > StoredID.equals(ID) > > These are objects in Java, so you need to use equals (or > StoreID.longValue==ID.longValue) > > Cheers > > Nicolas > > On Oct 21, 12:39 pm, John VDenley wrote: > > > OK so Im sending in an ID number (Long) and Im doing a query on the > > datastore, getting all the "contacts" in the database, using the > > "getID" function to get the "StoredID" and comparing the ID's. > > > However for some reason the boolean "test" below never becomes true, > > despite after stepping through the program there are times when > > StoredID=16 and ID=16, but yet (StoredID==ID) does not evaluate to > > "true" > > > anyone got any ideas? > > > public String updateContact(Long AdminID, Long ID, String > > Name,String Phone, String KnownAs, String Notes) throws > > NotLoggedInException { > > > Contact ContactToUpdate=null; > > Long StoredID; > > > PersistenceManager pm = PMF.get().getPersistenceManager(); > > try { > > Query q = pm.newQuery(Contact.class, "AdminID == AID"); > > q.declareParameters("Long AID"); > > List Contacts = (List) q.execute(AdminID); > > for (Contact contact : Contacts) > > { > > > StoredID=contact.getID(); > > boolean test=(StoredID==ID); > > if (test) > > { > > ContactToUpdate=contact; > > } > > else > > { > > ContactToUpdate=null; > > } > > } > > } > > finally > > { > > pm.close(); > > } > > } --~--~-~--~~~---~--~~ 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] Re: where I should put the Task Queue code?
Yes, I would like a "real" example of how to do this too, I get that we need to use a URL to accept the request to do something, but where does the URL start executing code. obviously its not going to be at the "onModuleLoad" entry point. Thanks, John On Nov 11, 1:23 am, edarroyo wrote: > Is there any gae samples usingtaskqueues that we can look at? > I am having a really hard time understanding how to useTaskQueues. > > Thanks! > > On Oct 27, 6:18 pm, Vincent wrote: > > > > > Thanks , Jason. It's very helpful for me to understand how to use this > > new API. -- 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-j...@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] Re: where I should put the Task Queue code?
Thanks for this Rusty, Im not sure I understand all of it right away (perhaps with more investigation I will work it out) However Its worth mentioning that as far as I know Im not using Spring or Stripes or Struts (not even sure what any of these are!) I am using native GWT (v2.0)/GAE (v1.2.8) and using RPC to make calls to the server side. I have tried creating a "public" function in my main java file (right above the onModuleLoad() function) as follows: public void testqueues() { Window.alert("hello test queues"); } The thinking then being that I might be able to make a call to http://your-gae-app.appspot.com/testqueues and it would show the alert box. (I would like to prove this in the dev environment, but Im not sure how to do this now that the URL for that is currently http://localhost:/IDeBanet.html/testqueues?gwt.codesvr=192.168.0.6:9997) Its entirely possible that I have totally misunderstood how this is meant to be working and if so I apologise for asking stupid questions, or making incorrect/confusing statements, but it seems theres no real way of figuring out this stuff until you just try to implement it! Ive learnt a huge amount about web development and in particular GWT/GAE over the last 4-5 months!! Cheers, J On Dec 13, 5:46 am, Rusty Wright wrote: > I think I got the gist of it. As a test I modified the Stripes action bean > that handles my first page and added the following to its @DefaultHandler > method: > > final Queue queue = QueueFactory.getDefaultQueue(); > queue.add(TaskOptions.Builder.url("/zugzug.zug")); // web.xml maps *.zug to > stripes > > It's adding a task to the queue. > > Then I created an action bean for the gae task queue automaton to poke: > > @UrlBinding("/zugzug.zug") > public class TaskQueueActionBean implements ActionBean { ... > > and its @DefaultHandler method contains: > > @SuppressWarnings("unchecked") > final List headerNames = > Collections.list(getContext().getRequest().getHeaderNames()); > this.log.debug("header names: {}", headerNames); > > And then the log received: > > header names: [Content-Type, User-Agent, Referer, Host, > X-AppEngine-QueueName, X-AppEngine-TaskName, X-AppEngine-TaskRetryCount, > Content-Length] > > The first time I tried it I forgot to create the corresponding jsp view file, > zugzug.jsp (which is essentially empty), and the task queue automaton kept > retrying because stripes was returning an error because the jsp file was > missing; lots of those log.debug lines in the log file. After I fixed that > then it was only in there once for each time I went to my first page. > > The first page action bean enqueued the task, the task queue automaton sent > an http request to the url zugzug.zug, then the TaskQueueActionBean was > invoked and its success caused the automaton to dequeue the task (but not if > it returned an error; then the automaton retries). > > > > Rusty Wright wrote: > > The docs say "The default queue will call the request handler at the URL > > /worker ..." So it sounds to me that if you were, for example, using > > Spring MVC, and had a Spring controller with > > > @Controller > > @RequestMapping("/worker") > > public final class WorkerController { > > �...@requestmapping(method = RequestMethod.GET) > > public String handleGetRequest(final ModelMap model) { > > this.log.debug("called"); > > > return (null); > > } > > } > > > then it would call your handleGetRequest() method 5 times a second, by > > sending an http GET (or POST?) request to your /worker url each time. > > > Similarly, with Stripes (and for Struts 2 probably something similar) it > > would be something like > > > @UrlBinding("/worker") > > public class WorkerActionBean implements ActionBean { > > �...@defaulthandler > > public Resolution handleRequest() { > > this.log.debug("called"); > > > return (null); > > } > > } > > > I'm returning null because I don't know what the task queue thing does > > with what it gets back (I didn't read much of their docs; to tell the > > truth, I stopped at that sentence I quoted at the top because it sounds > > very similar to their cron thing, which docs I did read most of). I'm > > undoubtedly also lacking the code needed to pull the next task off the > > queue and do something with it. > > > I'm assuming that you have some web framework in front of everything and > > thus don't need a servlet mapping in your web.xml for the /worker url > > since the web framework is handling the url mapping. > > > So they're "pinging" your /worker url using a plain old http request to > > initiate running each task; your controller or action bean is what > > performs the task. Think of it like you typed in your browser's address > > boxhttp://your-gae-app.appspot.com/worker?task_queue_params_go_hereor > > you used the command line programs cURL or wget. > > > If I understand this correctly then I would say that their senten
[appengine-java] Re: where I should put the Task Queue code?
LOL - damn... though it shouldnt matter whats being used for the front end reallymaybe Im asking the wrong question!! Does anyone else have any idea how to explain what the entry point is within the java code, or where the code is that actually executes what the task queue is supposed to do? Does anyone know how to ask the question Im trying to ask?! On Dec 13, 8:22 pm, Rusty Wright wrote: > Heh, I'm on the flip side; I don't know anything about GWT. > > > > John V Denley wrote: > > Thanks for this Rusty, Im not sure I understand all of it right away > > (perhaps with more investigation I will work it out) > > However Its worth mentioning that as far as I know Im not using Spring > > or Stripes or Struts (not even sure what any of these are!) > > I am using native GWT (v2.0)/GAE(v1.2.8) and using RPC to make calls > > to the server side. > > > I have tried creating a "public" function in my main java file (right > > above the onModuleLoad() function) as follows: > > public void testqueues() > > { > > Window.alert("hello test queues"); > > } > > > The thinking then being that I might be able to make a call to > >http://your-gae-app.appspot.com/testqueuesand it would show the alert > > box. (I would like to prove this in the dev environment, but Im not > > sure how to do this now that the URL for that is currently > >http://localhost:/IDeBanet.html/testqueues?gwt.codesvr=192.168.0) > > > Its entirely possible that I have totally misunderstood how this is > > meant to be working and if so I apologise for asking stupid questions, > > or making incorrect/confusing statements, but it seems theres no real > > way of figuring out this stuff until you just try to implement it! Ive > > learnt a huge amount about web development and in particular GWT/GAE > > over the last 4-5 months!! > > > Cheers, > > J > > > On Dec 13, 5:46 am, Rusty Wright wrote: > >> I think I got the gist of it. As a test I modified the Stripes action > >> bean that handles my first page and added the following to its > >> @DefaultHandler method: > > >> finalQueuequeue= QueueFactory.getDefaultQueue(); > >> queue.add(TaskOptions.Builder.url("/zugzug.zug")); // web.xml maps *.zug > >> to stripes > > >> It's adding ataskto thequeue. > > >> Then I created an action bean for thegaetaskqueueautomaton to poke: > > >> @UrlBinding("/zugzug.zug") > >> public class TaskQueueActionBean implements ActionBean { ... > > >> and its @DefaultHandler method contains: > > >> @SuppressWarnings("unchecked") > >> final List headerNames = > >> Collections.list(getContext().getRequest().getHeaderNames()); > >> this.log.debug("header names: {}", headerNames); > > >> And then the log received: > > >> header names: [Content-Type, User-Agent, Referer, Host, > >> X-AppEngine-QueueName, X-AppEngine-TaskName, X-AppEngine-TaskRetryCount, > >> Content-Length] > > >> The first time I tried it I forgot to create the corresponding jsp view > >> file, zugzug.jsp (which is essentially empty), and thetaskqueueautomaton > >> kept retrying because stripes was returning an error because the jsp file > >> was missing; lots of those log.debug lines in the log file. After I fixed > >> that then it was only in there once for each time I went to my first page. > > >> The first page action bean enqueued thetask, thetaskqueueautomaton sent an > >> http request to the url zugzug.zug, then the TaskQueueActionBean was > >> invoked and its success caused the automaton to dequeue thetask(but not if > >> it returned an error; then the automaton retries). > > >> Rusty Wright wrote: > >>> The docs say "The defaultqueuewill call the request handler at the URL > >>> /worker ..." So it sounds to me that if you were, forexample, using > >>> Spring MVC, and had a Spring controller with > >>> @Controller > >>> @RequestMapping("/worker") > >>> public final class WorkerController { > >>> �...@requestmapping(method = RequestMethod.GET) > >>> public String handleGetRequest(final ModelMap model) { > >>> this.log.debug("called"); > >>> return (null); > >>> } > >>> } > >>> then it would call your handleGetRequest() method 5 times a second, by > >>> sending an http GET (or POST
[appengine-java] Re: where I should put the Task Queue code?
Well put Rusty, thats exactly the frustration im having!!! LOL On Dec 13, 9:42 pm, Rusty Wright wrote: > What method gets called in your code when your app receives a GET request? > Or a POST request? I think that's what you're looking for. Unfortunately > the documentation for these frameworks sometimes tries to sugar coat things > and hide ("abstract away") these low level details, or they assume it's > obvious how things work, which it may be to to some but not all of us. > > > > John V Denley wrote: > > LOL - damn... though it shouldnt matter whats being used for the front > > end reallymaybe Im asking the wrong question!! > > > Does anyone else have any idea how to explain what the entry point is > > within the java code, or where the code is that actually executes what > > thetaskqueueis supposed to do? Does anyone know how to ask the > > question Im trying to ask?! > > > On Dec 13, 8:22 pm, Rusty Wright wrote: > >> Heh, I'm on the flip side; I don't know anything about GWT. > > >> John V Denley wrote: > >>> Thanks for this Rusty, Im not sure I understand all of it right away > >>> (perhaps with more investigation I will work it out) > >>> However Its worth mentioning that as far as I know Im not using Spring > >>> or Stripes or Struts (not even sure what any of these are!) > >>> I am using native GWT (v2.0)/GAE(v1.2.8) and using RPC to make calls > >>> to the server side. > >>> I have tried creating a "public" function in my main java file (right > >>> above the onModuleLoad() function) as follows: > >>> public void testqueues() > >>> { > >>> Window.alert("hello test queues"); > >>> } > >>> The thinking then being that I might be able to make a call to > >>>http://your-gae-app.appspot.com/testqueuesandit would show the alert > >>> box. (I would like to prove this in the dev environment, but Im not > >>> sure how to do this now that the URL for that is currently > >>>http://localhost:/IDeBanet.html/testqueues?gwt.codesvr=192.168.0) > >>> Its entirely possible that I have totally misunderstood how this is > >>> meant to be working and if so I apologise for asking stupid questions, > >>> or making incorrect/confusing statements, but it seems theres no real > >>> way of figuring out this stuff until you just try to implement it! Ive > >>> learnt a huge amount about web development and in particular GWT/GAE > >>> over the last 4-5 months!! > >>> Cheers, > >>> J > >>> On Dec 13, 5:46 am, Rusty Wright wrote: > >>>> I think I got the gist of it. As a test I modified the Stripes action > >>>> bean that handles my first page and added the following to its > >>>> @DefaultHandler method: > >>>> finalQueuequeue= QueueFactory.getDefaultQueue(); > >>>> queue.add(TaskOptions.Builder.url("/zugzug.zug")); // web.xml maps > >>>> *.zug to stripes > >>>> It's adding ataskto thequeue. > >>>> Then I created an action bean for thegaetaskqueueautomaton to poke: > >>>> @UrlBinding("/zugzug.zug") > >>>> public class TaskQueueActionBean implements ActionBean { ... > >>>> and its @DefaultHandler method contains: > >>>> @SuppressWarnings("unchecked") > >>>> final List headerNames = > >>>> Collections.list(getContext().getRequest().getHeaderNames()); > >>>> this.log.debug("header names: {}", headerNames); > >>>> And then the log received: > >>>> header names: [Content-Type, User-Agent, Referer, Host, > >>>> X-AppEngine-QueueName, X-AppEngine-TaskName, X-AppEngine-TaskRetryCount, > >>>> Content-Length] > >>>> The first time I tried it I forgot to create the corresponding jsp view > >>>> file, zugzug.jsp (which is essentially empty), and thetaskqueueautomaton > >>>> kept retrying because stripes was returning an error because the jsp > >>>> file was missing; lots of those log.debug lines in the log file. After > >>>> I fixed that then it was only in there once for each time I went to my > >>>> first page. > >>>> The first page action bean enqueued thetask, thetaskqueueautomaton sent > >>>> an http request to the url zugzug.zug, then the TaskQueueActio
[appengine-java] Re: where I should put the Task Queue code?
Thanks JD (slightly weird, I feel like Im writing to myself!) I think we all understand what task queues are, the problem is how to actually set up the functionality behind the URL I think we are getting close to a simple example, which I will post as soon as I get this mechanism working. From what I can tell it works something like this (which Im posing as a series of questions): Where should I put the function which extends the HttpServlet (eg public class MyServletFunction extends HttpServlet {/*do something useful*/} ) I'm guessing it should be on the server side (eg as a new file within com.myappname.server) called MyServletFunctionFile.java? If so then should this be included somewhere OTHER than in the myappname.gwt.xml file (eg ) Im guessing that this would then mean that in theory I could type in http://myappname.appspot.com/MyServletFunction to invoke the "/*do something useful*/" code? Is there anything else I'm meant to define anywhere? Have I totally misunderstood this process? If so then hopefully what Ive written here illustrates the problems that some of us are having with getting our head around some of these "basic" concepts! Thanks for everyones input and help so far here guys... Cheers, J On Dec 14, 3:00 am, jd wrote: > Hi, task queues are just a way to call a url some time in the future. > As Jason mentioned above, for a tasks "handler" you should probably > just create a servlet (extend HttpServlet) because you do not need to > generate a nice webpage as the result of the call - no one will see > it. In the HttpServlet.service(...) method write your code to > actually handle the task making sure that it won't take longer than 30 > seconds. This method will be called for POSTs or GETs to its url. > Then you need to define the url that will call this servlet in your > web.xml file. If you are just using the default queue then you should > map /_ah/queue/default to your "handler" servlet. > > To execute your task you could either call the url directly in a > browser, from your GWT client or from other server side code. But you > probably want to use the TaskQueue to schedule the call for some time > in the future from some other server side code like within your GWT > RPC servlet. > > On Dec 14, 4:53 am, John V Denley wrote: > > > > > Well put Rusty, thats exactly the frustration im having!!! LOL > > > On Dec 13, 9:42 pm, Rusty Wright wrote: > > > > What method gets called in your code when your app receives a GET > > > request? Or a POST request? I think that's what you're looking for. > > > Unfortunately the documentation for these frameworks sometimes tries to > > > sugar coat things and hide ("abstract away") these low level details, or > > > they assume it's obvious how things work, which it may be to to some but > > > not all of us. > > > > John V Denley wrote: > > > > LOL - damn... though it shouldnt matter whats being used for the front > > > > end reallymaybe Im asking the wrong question!! > > > > > Does anyone else have any idea how to explain what the entry point is > > > > within the java code, or where the code is that actually executes what > > > > thetaskqueueis supposed to do? Does anyone know how to ask the > > > > question Im trying to ask?! > > > > > On Dec 13, 8:22 pm, Rusty Wright wrote: > > > >> Heh, I'm on the flip side; I don't know anything about GWT. > > > > >> John V Denley wrote: > > > >>> Thanks for this Rusty, Im not sure I understand all of it right away > > > >>> (perhaps with more investigation I will work it out) > > > >>> However Its worth mentioning that as far as I know Im not using Spring > > > >>> or Stripes or Struts (not even sure what any of these are!) > > > >>> I am using native GWT (v2.0)/GAE(v1.2.8) and using RPC to make calls > > > >>> to the server side. > > > >>> I have tried creating a "public" function in my main java file (right > > > >>> above the onModuleLoad() function) as follows: > > > >>> public void testqueues() > > > >>> { > > > >>> Window.alert("hello test queues"); > > > >>> } > > > >>> The thinking then being that I might be able to make a call to > > > >>>http://your-gae-app.appspot.com/testqueuesanditwouldshow the alert > > > >>> box. (I would like to prove this in the dev environment, but Im not > > > >>> sure how
[appengine-java] Re: where I should put the Task Queue code?
Wondering if this is now really a GWT question? Anyone got any ideas? On Dec 14, 10:25 am, John V Denley wrote: > Thanks JD (slightly weird, I feel like Im writing to myself!) I think > we all understand what task queues are, the problem is how to actually > set up the functionality behind the URL > > I think we are getting close to a simple example, which I will post as > soon as I get this mechanism working. From what I can tell it works > something like this (which Im posing as a series of questions): > > Where should I put the function which extends the HttpServlet (eg > public class MyServletFunction extends HttpServlet {/*do something > useful*/} ) > I'm guessing it should be on the server side (eg as a new file within > com.myappname.server) called MyServletFunctionFile.java? > If so then should this be included somewhere OTHER than in the > myappname.gwt.xml file (eg class="com.myappname.server.MyServletFunctionFile"/>) > > Im guessing that this would then mean that in theory I could type > inhttp://myappname.appspot.com/MyServletFunctionto invoke the "/*do > something useful*/" code? > > Is there anything else I'm meant to define anywhere? Have I totally > misunderstood this process? If so then hopefully what Ive written here > illustrates the problems that some of us are having with getting our > head around some of these "basic" concepts! > > Thanks for everyones input and help so far here guys... > > Cheers, > J > > On Dec 14, 3:00 am, jd wrote: > > > > > Hi, task queues are just a way to call a url some time in the future. > > As Jason mentioned above, for a tasks "handler" you should probably > > just create a servlet (extend HttpServlet) because you do not need to > > generate a nice webpage as the result of the call - no one will see > > it. In the HttpServlet.service(...) method write your code to > > actually handle the task making sure that it won't take longer than 30 > > seconds. This method will be called for POSTs or GETs to its url. > > Then you need to define the url that will call this servlet in your > > web.xml file. If you are just using the default queue then you should > > map /_ah/queue/default to your "handler" servlet. > > > To execute your task you could either call the url directly in a > > browser, from your GWT client or from other server side code. But you > > probably want to use the TaskQueue to schedule the call for some time > > in the future from some other server side code like within your GWT > > RPC servlet. > > > On Dec 14, 4:53 am, John VDenley wrote: > > > > Well put Rusty, thats exactly the frustration im having!!! LOL > > > > On Dec 13, 9:42 pm, Rusty Wright wrote: > > > > > What method gets called in your code when your app receives a GET > > > > request? Or a POST request? I think that's what you're looking for. > > > > Unfortunately the documentation for these frameworks sometimes tries to > > > > sugar coat things and hide ("abstract away") these low level details, > > > > or they assume it's obvious how things work, which it may be to to some > > > > but not all of us. > > > > > John VDenleywrote: > > > > > LOL - damn... though it shouldnt matter whats being used for the front > > > > > end reallymaybe Im asking the wrong question!! > > > > > > Does anyone else have any idea how to explain what the entry point is > > > > > within the java code, or where the code is that actually executes what > > > > > thetaskqueueis supposed to do? Does anyone know how to ask the > > > > > question Im trying to ask?! > > > > > > On Dec 13, 8:22 pm, Rusty Wright wrote: > > > > >> Heh, I'm on the flip side; I don't know anything about GWT. > > > > > >> John VDenleywrote: > > > > >>> Thanks for this Rusty, Im not sure I understand all of it right away > > > > >>> (perhaps with more investigation I will work it out) > > > > >>> However Its worth mentioning that as far as I know Im not using > > > > >>> Spring > > > > >>> or Stripes or Struts (not even sure what any of these are!) > > > > >>> I am using native GWT (v2.0)/GAE(v1.2.8) and using RPC to make calls > > > > >>> to the server side. > > > > >>> I have tried creating a "public" function in my main java file > > > > >>> (right &g
[appengine-java] Re: where I should put the Task Queue code?
That looks like just what I needed, Thanks David On Dec 15, 9:17 pm, David Chandler wrote: > Vince Bonfanti's Deferred.defer() makes using task queues very easy, > as there's only one servlet needed and he's already written it! > There's an example of using it and a reference to the forum thread in > which Vince posted the code here: > > http://turbomanage.wordpress.com/2009/11/20/deferred-defer-is-a-thing... > > HTH, > /dmc > > On Dec 15, 2:23 pm, Rusty Wright wrote: > > > At this point I'd suggest that you don't do it with GWT; step into the > > wayback machine and write a plain java servlet and do the necessary > > configuration/mapping with your web.xml. Can you say old school? There > > should be plenty of tutorials and samples on the web. > > > I'm thinking that you'd extend javax.servlet.http.HttpServlet and override > > its doGet() method. > > > John VDenleywrote: > > > Wondering if this is now really a GWT question? Anyone got any ideas? > > > > On Dec 14, 10:25 am, John VDenley wrote: > > >> Thanks JD (slightly weird, I feel like Im writing to myself!) I think > > >> we all understand what task queues are, the problem is how to actually > > >> set up the functionality behind the URL > > > >> I think we are getting close to a simple example, which I will post as > > >> soon as I get this mechanism working. From what I can tell it works > > >> something like this (which Im posing as a series of questions): > > > >> Where should I put the function which extends the HttpServlet (eg > > >> public class MyServletFunction extends HttpServlet {/*do something > > >> useful*/} ) > > >> I'm guessing it should be on the server side (eg as a new file within > > >> com.myappname.server) called MyServletFunctionFile.java? > > >> If so then should this be included somewhere OTHER than in the > > >> myappname.gwt.xml file (eg > >> class="com.myappname.server.MyServletFunctionFile"/>) > > > >> Im guessing that this would then mean that in theory I could type > > >> inhttp://myappname.appspot.com/MyServletFunctiontoinvokethe "/*do > > >> something useful*/" code? > > > >> Is there anything else I'm meant to define anywhere? Have I totally > > >> misunderstood this process? If so then hopefully what Ive written here > > >> illustrates the problems that some of us are having with getting our > > >> head around some of these "basic" concepts! > > > >> Thanks for everyones input and help so far here guys... > > > >> Cheers, > > >> J > > > >> On Dec 14, 3:00 am, jd wrote: > > > >>> Hi, task queues are just a way to call a url some time in the future. > > >>> As Jason mentioned above, for a tasks "handler" you should probably > > >>> just create a servlet (extend HttpServlet) because you do not need to > > >>> generate a nice webpage as the result of the call - no one will see > > >>> it. In the HttpServlet.service(...) method write your code to > > >>> actually handle the task making sure that it won't take longer than 30 > > >>> seconds. This method will be called for POSTs or GETs to its url. > > >>> Then you need to define the url that will call this servlet in your > > >>> web.xml file. If you are just using the default queue then you should > > >>> map /_ah/queue/default to your "handler" servlet. > > >>> To execute your task you could either call the url directly in a > > >>> browser, from your GWT client or from other server side code. But you > > >>> probably want to use the TaskQueue to schedule the call for some time > > >>> in the future from some other server side code like within your GWT > > >>> RPC servlet. > > >>> On Dec 14, 4:53 am, John VDenley wrote: > > Well put Rusty, thats exactly the frustration im having!!! LOL > > On Dec 13, 9:42 pm, Rusty Wright wrote: > > > What method gets called in your code when your app receives a GET > > > request? Or a POST request? I think that's what you're looking for. > > > Unfortunately the documentation for these frameworks sometimes tries > > > to sugar coat things and hide ("abstract away") these low level > > > details, or they assume it's obvious how things work, which it may be > > > to to some but not all of us. > > > John VDenleywrote: > > >> LOL - damn... though it shouldnt matter whats being used for the > > >> front > > >> end reallymaybe Im asking the wrong question!! > > >> Does anyone else have any idea how to explain what the entry point is > > >> within the java code, or where the code is that actually executes > > >> what > > >> thetaskqueueis supposed to do? Does anyone know how to ask the > > >> question Im trying to ask?! > > >> On Dec 13, 8:22 pm, Rusty Wright wrote: > > >>> Heh, I'm on the flip side; I don't know anything about GWT. > > >>> John VDenleywrote: > > Thanks for this Rusty, Im not sure I understand all of it right > > away > > (perhaps with more investigation I will work it out) > > >>
[appengine-java] Google Accounts are killing my application!....
I have been trying to leverage google accounts for security for my users, but the way its working is really preventing useability within my application, its very frustrating Ive just spent the best part of the last week trying to get the google account login to work in an frame within my application. Ive run into a number of related issues (see other threads in the GWT group) which I have manage to work through finally. (Thanks to everyone who helped out and provided input) However, I have just tried clicking on the "create an account now" link which is what will be used by any new user who doesnt currently have a google account, but the account creation window has "frame breakout" code on it, which takes my users away from my application again, and then after clicking on the email link to confirm thier new account, the user is NOT taken back to my application but are just congratulated for creating a google account. The problem is that the user is then left thinking "now what do i do?" and several of the people we are talking to have just given up at that point! Has anyone else successfully integrated Google accounts into their applications? Should I create my own logins rather than using Google accounts? I have struggled with getting a consistent answer to the problem of how to send passwords to the server given that GAE doesnt support SSL or HTTPS yet. Everyone seems to say that any client side encoding is pointless, but it seems to me that some form of encoding has to be better than not encoding at all!! -- 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-j...@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] Re: Google Accounts are killing my application!....
The frame works fine when logging in. If its a security risk please elaborate, Im onlt using Google accounts because I dont really know how to do my own security, and Im guessing that even using google via a frame is more secure than trying to do it myself! When creating an account it does not take the user back to the original page as there is a total disconnect after the user clicks on the link in the email sent from google. Google have informed me that this is a known issue, but has a low priority (which is understandable). I have now created what I think is a reasonable compromise. Only time will tell if our potential customers are ok with the process! On Feb 18, 7:04 pm, Brian wrote: > You shouldn't use a frame. It is a security problem, and right of > google login code to break out of it. > > After they make a new account, if not using a frame, I believe it > forwards the user back to the page they were trying to go to. Seems to > work pretty well. > > On Feb 18, 8:40 am, John V Denley wrote: > > > I have been trying to leverage google accounts for security for my > > users, but the way its working is really preventing useability within > > my application, its very frustrating > > > Ive just spent the best part of the last week trying to get the google > > account login to work in an frame within my application. Ive run into > > a number of related issues (see other threads in the GWT group) which > > I have manage to work through finally. (Thanks to everyone who helped > > out and provided input) > > > However, I have just tried clicking on the "create an account now" > > link which is what will be used by any new user who doesnt currently > > have a google account, but the account creation window has "frame > > breakout" code on it, which takes my users away from my application > > again, and then after clicking on the email link to confirm thier new > > account, the user is NOT taken back to my application but are just > > congratulated for creating a google account. > > > The problem is that the user is then left thinking "now what do i do?" > > and several of the people we are talking to have just given up at that > > point! > > > Has anyone else successfully integrated Google accounts into their > > applications? > > > Should I create my own logins rather than using Google accounts? I > > have struggled with getting a consistent answer to the problem of how > > to send passwords to the server given that GAE doesnt support SSL or > > HTTPS yet. Everyone seems to say that any client side encoding is > > pointless, but it seems to me that some form of encoding has to be > > better than not encoding at all!! -- 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-j...@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] Re: NullPointerException while running a new app
Yup, Im getting this problem too. Im actually getting "An internal error occurred during: "DataNucleus Enhancer". java.lang.NullPointerException" when I try to build a clean project... I wish it would give me a better error message, or at least a better idea of where the error is occurring! On Mar 14, 5:30 pm, Diana Cruise wrote: > Help anyone...the key here is the stack trace but it points to a line > in the generated .java file that came from the .jsp. I am also > getting a null pointer but when I check the line number using the > generated .java on my local system, it does NOT make sense. Hence, > the line number in production is NOT matching the line numbers > locally!!! How do we affectively trouble-shoot a JSP stack dump on > GAE? > > On Mar 13, 3:07 pm, anjolight wrote: > > > Hi I am getting the same NullPointerException. > > > The challenge is that my app runs fine in my local eclipse but it > > gives me this error when it's deployed to app engine. And the error > > gives me very little information as to what went wrong. > > > What's the best way to debug the nullpointerexception with JSP? > > > On Feb 24, 5:05 pm, "Ikai L (Google)" wrote: > > > > What's your application ID? > > > > On Fri, Feb 19, 2010 at 12:05 AM, Alberty Pascal > > > wrote: > > > > > Hi all, > > > > > while updating my application, I got the following stack for all > > > > request made on it. > > > > I try to deploy a really simple new application (created with Eclipse > > > > and its plugin) and got the same stack. > > > > > Any idea ? > > > > > Thanks > > > > > Pascal > > > > >java.lang.NullPointerException > > > > at > > > > com.google.appengine.runtime.Request.process-7d335e6a040b96cc(Request.java) > > > > at org.apache.jsp.index_jsp._jspService(index_jsp.java:44) > > > > at > > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) > > > > at > > > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: > > > > 487) > > > > at > > > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: > > > > 362) > > > > at > > > > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: > > > > 216) > > > > at > > > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: > > > > 181) > > > > at > > > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: > > > > 712) > > > > at > > > > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: > > > > 405) > > > > at > > > > org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:268) > > > > at > > > > org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126) > > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) > > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) > > > > at > > > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: > > > > 487) > > > > at org.mortbay.jetty.servlet.ServletHandler > > > > $CachedChain.doFilter(ServletHandler.java:1093) > > > > at > > > > > com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: > > > > 97) > > > > at org.mortbay.jetty.servlet.ServletHandler > > > > $CachedChain.doFilter(ServletHandler.java:1084) > > > > at > > > > > com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: > > > > 35) > > > > at org.mortbay.jetty.servlet.ServletHandler > > > > $CachedChain.doFilter(ServletHandler.java:1084) > > > > at > > > > > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: > > > > 43) > > > > at org.mortbay.jetty.servlet.ServletHandler > > > > $CachedChain.doFilter(ServletHandler.java:1084) > > > > at > > > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: > > > > 360) > > > > at > > > > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: > > > > 216) > > > > at > > > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: > > > > 181) > > > > at > > > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: > > > > 712) > > > > at > > > > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: > > > > 405) > > > > at > > > > > com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: > > > > 238) > > > > at > > > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: > > > > 139) > > > > at org.mortbay.jetty.Server.handle(Server.java:313) > > > > at > > > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: > > > > 506) > > > > at org.mortbay.jetty.HttpConnection > > > > $RequestHandler.headerComplete(HttpConnection.java
[appengine-java] Trying a clean compile gives "The parameter is incorrect"
What is this message telling me? 'DataNucleus Enhancer' has encountered a problem Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe" (in directory "C:\Documents and Settings\John\My Documents\_DeBa\ideba \iDeBanet"): CreateProcess error=87, The parameter is incorrect Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe" (in directory "C:\Documents and Settings\John\My Documents\_DeBa\ideba \iDeBanet"): CreateProcess error=87, The parameter is incorrect I cant seem to find anything helpful anywhere on the web, all I can find is suggestions that my classpath is too long for windows, but I dont know where to figure out what my classpath length is, plus its not THAT big a project, so im surprised ive hit any kind of limit, although I HAVE just included one additional *.java file in my client directory, but I have tried taking that out and recompiling clean, and its still happening! Is this a GWT problem? or an Eclipse problem or a Java problem? Any pointers would be really helpful, as i have a deadline for tomorrow, the code is all done, I just cant seem to deploy it! Thanks, John PS Im posting this on the GWT group too, as I have to catch a train now, and will be back later to see if anyone has replied! -- 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-j...@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] Re: Trying a clean compile gives "The parameter is incorrect"
Im on the train now... hoping my connection holds up, but just incase it helps, I have now rolled back to a version of the code that I comiled and deployed successfully last night, and Im still getting this error, so something else has changed, and its not me thats changed it... this must be something that Eclipse or Java compiler is picking up from somewhere else!. On Apr 5, 3:54 pm, John V Denley wrote: > What is this message telling me? > > 'DataNucleus Enhancer' has encountered a problem > > Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe" (in > directory "C:\Documents and Settings\John\My Documents\_DeBa\ideba > \iDeBanet"): CreateProcess error=87, The parameter is incorrect > Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe" (in > directory "C:\Documents and Settings\John\My Documents\_DeBa\ideba > \iDeBanet"): CreateProcess error=87, The parameter is incorrect > > I cant seem to find anything helpful anywhere on the web, all I can > find is suggestions that my classpath is too long for windows, but I > dont know where to figure out what my classpath length is, plus its > not THAT big a project, so im surprised ive hit any kind of limit, > although I HAVE just included one additional *.java file in my client > directory, but I have tried taking that out and recompiling clean, and > its still happening! > > Is this aGWTproblem? or an Eclipse problem or a Java problem? > > Any pointers would be really helpful, as i have a deadline for > tomorrow, the code is all done, I just cant seem to deploy it! > > Thanks, > John > PS Im posting this on theGWTgrouptoo, as I have to catch a train > now, and will be back later to see if anyone has replied! -- 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-j...@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] Re: Trying a clean compile gives "The parameter is incorrect"
Thanks to the guys on the GWT forum for helping me solve this problem. It did turn out to be a classpath problem and there follows an explanation of the steps I took to discover the issue and how I solved it: To find out the classpath used: In Eclipse select Debug view by going to "Window|Open Perspective|Debug" and then select the debug window by going to "Window|Show View|Debug" then right click the last item in the list shown and select "properties" I found that my appengine SDK path was being references about 21 times as: C:\Program Files\eclipse\plugins \com.google.appengine.eclipse.sdkbundle. 1.3.2_1.3.2.v201003241245\appengine-java-sdk-1.3.2 so I copied it to "C:\appengine-java-sdk-1.3.2" And then linked to it by doing the following: In Eclipse select the Java view by going to "Window|Open Perspective| Java" and then select the project properties by going to "Project| Properties" then select "Google|App Engine" and click on "Configure SDK's" then click "Add" on the right hand side and select the path you just created eg "C:\appengine-java-sdk-1.3.2" and add a "Display Name" eg "Short App Engine SDK". Click OK as needed to close all the windows, and everything should start working again!!! Good Luck, John On Apr 5, 5:20 pm, John V Denley wrote: > Im on the train now... hoping my connection holds up, but just incase > it helps, I have now rolled back to a version of the code that I > comiled and deployed successfully last night, and Im still getting > this error, so something else has changed, and its not me thats > changed it... this must be something that Eclipse or Java compiler is > picking up from somewhere else!. > > On Apr 5, 3:54 pm, John V Denley wrote: > > > What is this message telling me? > > > 'DataNucleus Enhancer' has encountered a problem > > > Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe" (in > > directory "C:\Documents and Settings\John\My Documents\_DeBa\ideba > > \iDeBanet"): CreateProcess error=87, The parameter is incorrect > > Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe" (in > > directory "C:\Documents and Settings\John\My Documents\_DeBa\ideba > > \iDeBanet"): CreateProcess error=87, The parameter is incorrect > > > I cant seem to find anything helpful anywhere on the web, all I can > > find is suggestions that my classpath is too long for windows, but I > > dont know where to figure out what my classpath length is, plus its > > not THAT big a project, so im surprised ive hit any kind of limit, > > although I HAVE just included one additional *.java file in my client > > directory, but I have tried taking that out and recompiling clean, and > > its still happening! > > > Is this aGWTproblem? or an Eclipse problem or a Java problem? > > > Any pointers would be really helpful, as i have a deadline for > > tomorrow, the code is all done, I just cant seem to deploy it! > > > Thanks, > > John > > PS Im posting this on theGWTgrouptoo, as I have to catch a train > > now, and will be back later to see if anyone has replied! -- 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-j...@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] Just had about 10 minutes of being unable to access my App Engine client sites
In my logs I was getting the following types of error: It kept coming up with a page which said "if this keeps happening please report it" and the link took me to this community, so can anyone give me any clues as to what was going wrong, and possibly more importantly how to stop it happening in the future?! Thanks, J 1. 2011-07-29 12:44:58.481 Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@e41d4a{/,/base/data/home/apps/idebanet/5-04.352068144401425901} com.google.apphosting.api.DeadlineExceededException: This request (2deb525024023226) started at 2011/07/29 11:44:09.750 UTC and was still executing at 2011/07/29 11:44:58.433 UTC. at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:143) at java.util.jar.JarFile.(JarFile.java:150) at java.util.jar.JarFile.(JarFile.java:87) at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:660) at sun.misc.URLClassPath$JarLoader.access$600(URLClassPath.java:555) at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:622) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:614) at sun.misc.URLClassPath$JarLoader.(URLClassPath.java:598) at sun.misc.URLClassPath$3.run(URLClassPath.java:348) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath.getLoader(URLClassPath.java:337) at sun.misc.URLClassPath.getLoader(URLClassPath.java:314) at sun.misc.URLClassPath.findResource(URLClassPath.java:161) at java.net.URLClassLoader$2.run(URLClassLoader.java:379) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(URLClassLoader.java:376) at com.google.apphosting.runtime.security.UserClassLoader.findResource(UserClassLoader.java:699) at java.lang.ClassLoader.getResource(ClassLoader.java:977) at org.mortbay.resource.Resource.newSystemResource(Resource.java:203) at org.mortbay.jetty.webapp.WebXmlConfiguration.configureDefaults(WebXmlConfiguration.java:159) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1230) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:202) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:260) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:9805) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:422) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:579) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:449) at com.google.tracing.TraceContext.runInContext(TraceContext.java:689) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:327) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:319) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:447) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) 2. C2011-07-29 12:44:58.490 Uncaught exception from servlet javax.servlet.UnavailableException: Initialization failed. at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:211) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:260) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:9805) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:422) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:579) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:449) at com.google.tra
[appengine-java] Re: CreateProcess error=87
FYI this is a known issue (#4395) http://code.google.com/p/google-web-toolkit/issues/detail?id=4395 and my latest update on that thread confirms what Didier stated above, put your database table definitions in a separate folder and just add that as an enhancement in the ORM settings (got to by selecting the project, choosing "Project|Properties" and then "Google|App Engine|ORM" Good Luck, J -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/VwZ4HMohDtgJ. 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] achieving URL redirection (.htaccess) functionality with app engine?
I have an application where I want to simplify the URL for the end users so for example www.appname.appspot.com/demo would be redirected to www.appname.appspot.com/?id=demo currently Im doing this by using a .htaccess file on my hosting company website so that www.appname.com/demo is then redirected to user.appname.com/?id=demo and I have the CNAME for the user subdomain pointing to ghs.google.com which is managed within my googleapp to point back at www.appname.appspot.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-j...@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] Re: achieving URL redirection (.htaccess) functionality with app engine?
The reason I am asking this is because there seems to be a python solution for this as documented here: http://www.terminally-incoherent.com/blog/2009/05/11/google-appengine-url-rewriting/ On Jul 7, 10:36 pm, John V Denley wrote: > I have an application where I want to simplify theURLfor the end > users > > so for examplewww.appname.appspot.com/demowould be redirected > towww.appname.appspot.com/?id=demo > > currently Im doing this by using a .htaccess file on my hosting > company website so thatwww.appname.com/demois then redirected to > user.appname.com/?id=demo and I have the CNAME for the user subdomain > pointing to ghs.google.com which is managed within my googleapp to > point back atwww.appname.appspot.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-j...@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.