[appengine-java] Other Database other than BigTable
Hi..i want to use other database(not Google's Bigtable)as DBaaS for my application which is using google infrastructure.Is is Possible and how?? -- Thanks Regards Ravi Kumar Reddy K +91-8095749598 -- 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: Increased Average HTTP Response Times since Feb 12th 2012
Hi Mike how do you change the instance? On Saturday, 18 February 2012 19:20:34 UTC+5:30, Mike Lawrence wrote: I changed instaces settings in console from auto to a minimum of two and the response times are again about a second On Feb 16, 2:07 pm, Matthias Friedrich mtthsfrd...@gmail.com wrote: hi mike, i can confirm that. The responsetime is getting higher and higher, meanwhile some are above 90 seconds, causing complete failures. I wonder whats going on there? -- 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/-/xfvMnFzWksAJ. 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.
Re: [appengine-java] JDO advise
ANy particular problem?? I would design these classes like this... @PersistenceCapable(detachable = true) public class User implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private String email; private String firstName; private String lastName; private String password; private String passwordConf; private int status; private boolean enabled; } @PersistenceCapable(detachable = true) public class Event implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private Key owner; private SetKey participants; } Usually i prefer unowned relationship, but with new pricing you can say you can save some money by keeping a big entity(too many owned relationships). With Owned relation your User Entity will keep increasing in size with time. On Mon, Sep 19, 2011 at 1:50 AM, Alex grumpy.bur...@gmail.com wrote: Hi all, I'm using JDO for storage in GAE and would like some advice as I'm having trouble modelling my persistence objects. I have 2 classes, User and Event. A User owns an Event and can participate in others Events. My classes look roughly like this. @PersistenceCapable(detachable = true) public class User implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private String email; private String firstName; private String lastName; private String password; private String passwordConf; private int status; private boolean enabled; // owned one-to-many with event @Persistent(mappedBy = owner) private ListEvent ownsEvents = new ArrayListEvent(); // many to many private SetKey participatesInEvents = new HashSetKey(); -- 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/-/ruH77bWja5wJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] How to efficiently retrieve all the keys of a particular entity
Did u try Cursors? http://code.google.com/appengine/docs/java/datastore/queries.html#Query_Cursors On Thu, Sep 15, 2011 at 1:20 PM, cghersi cristiano.ghe...@gmail.com wrote: Hi all, I'm facing a little problem of scalability. I'm using JDO to query my datastore. I need to retrieve all the keys of a given entity (such keys are of type Long). Given that in my datastore such entity has 1.000.000 of records, I need to get them in a very efficient way, in order to loop over this set in a background task. Which is the most efficient way to do this? And what if I need not only the key, but also another field? Let's say I've got an entity called TPImage: Long idPic; //this is my key String title; //this is the field I want to retrieve together with the key ... // other properties How may I retrieve both idPic and title in a single efficient query? Something like Query q = new Query(select idPic, title from + TPImage.class.getName()); but more efficient? Thank you very much! Bye cghersi -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Re: BigTable LIKE
Lets say you have book Harry potter If you want to search this withH or Ha Har Harr then this facility provided by google app engine, instead of Like use startWith . Else if you really want to search it with arry or rry basically any word in it, then you may saev every book name as SetString (Not List avod duplicates) save following strings in Set and you will be bale to search it... H A R Y HA AR RR RY HAR ARR RRY HARR ARRY HARRY Ravi. On Mon, Aug 29, 2011 at 11:56 AM, J.Ganesan j.gane...@datastoregwt.comwrote: Why don't you consider splitting the keywords and maintaining a memcache-resident HashMapString,id ? J.Ganesan www.DataStoreGwt.com On Aug 26, 9:25 pm, realdope rte...@gmail.com wrote: Hi, I know that you cannot do a LIKE clause in BigTable. How do you get around this issue? Suppose I'm making a book database, and I want to implement a search function that compares titles against a random string. What is a plausible mechanism with which to do so? Any help would be appreciated! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Re: BigTable LIKE
I think keeping Keyword in seprate entity will be slower At time of writing you will be writing lots of entity instead of just one You will be worrying about how keyword will be mapped to each entity... iether by having a list of Keys in Keyword entity or specifying one to on emapping where keyword will be repeated If you want to get all entities which have some keywoprd and then sort by some field will cause you lots of in memory opeartion..first fetch keyword entity then get actual cnityt then sort it... On the otherhand List,Set property will be indexed too,and searching with in entity ort in anotehr entity its same. and this indexing is similar to a normal string indexing.. If you want to get all entities which have some keywoprd and then sort by some field , then you just need a composite index and it works its just read nad write for seprate entity will be more then a single entity. I would love to hear your thought as how you thought that single entity solution will be slower On Mon, Aug 29, 2011 at 7:40 PM, Nichole nichole.k...@gmail.com wrote: In addition to the above, I'd say you might want to make new keyword entities for each keyword and store the reference/key to the original entities instead of storing your keywords as a list of properties in your original entity. A list of strings is stored implicitly as an embedded table so will be slower to search for than searching for a keyword property in a separate entity - this later is indexed by the framework. On Aug 29, 4:01 am, Ravi Sharma ping2r...@gmail.com wrote: Lets say you have book Harry potter If you want to search this withH or Ha Har Harr then this facility provided by google app engine, instead of Like use startWith . Else if you really want to search it with arry or rry basically any word in it, then you may saev every book name as SetString (Not List avod duplicates) save following strings in Set and you will be bale to search it... H A R Y HA AR RR RY HAR ARR RRY HARR ARRY HARRY Ravi. On Mon, Aug 29, 2011 at 11:56 AM, J.Ganesan j.gane...@datastoregwt.com wrote: Why don't you consider splitting the keywords and maintaining a memcache-resident HashMapString,id ? J.Ganesan www.DataStoreGwt.com On Aug 26, 9:25 pm, realdope rte...@gmail.com wrote: Hi, I know that you cannot do a LIKE clause in BigTable. How do you get around this issue? Suppose I'm making a book database, and I want to implement a search function that compares titles against a random string. What is a plausible mechanism with which to do so? Any help would be appreciated! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Traffic from single IP address problem.
Hi Jayr, Thanks for your reply Jayr . I will make my question more clear. My users send queries through SMS which will be routed to my app from SMS GATEWAY(single IP address) . My app processes those queries and reply back through SMS (again through SMS GATEWAY) .I can reply using URL FETCH(not a problem) . But what i'm worried about is if i receive some 500 dynamic requests/sec from single IP address , GAE might block them thinking them as Dos(denial of service) attack . *GAE either asks the user to enter a captcha at https://www.google.com/accounts/DisplayUnlockCaptcha or redirects to sorry.google.com and displays an error message itseems if it receives unusual traffic from single IP . But my users access app only through SMS.* please look at this production issue filed : http://code.google.com/p/googleappengine/issues/detail?id=5239q=doscolspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log regards, ravi. On Thu, Jul 28, 2011 at 2:33 AM, Jayr Motta jayrmo...@gmail.com wrote: Frooti, It will work fine, you just have to be aware of the URLFetch service limitations, if you're going to communicate with the SMS gateway through http request / response, then the limitation is that your request / response should not take more than 10 seconds, but you can also try another approaches, we just need to know what you're able to do, how to communicate, etc .. then we can try to help you find the solution that best fits your need. Hope this helps. :) Jayr Motta Software Developer I'm on BlackBeltFactory.com! On Wed, Jul 27, 2011 at 10:35 AM, frooti ravi.muppalan...@gmail.com wrote: Hi, i want to host an SMS application on GAE . All my traffic comes from SMS GATEWAY with a single IP address. Is that fine ? or Will there be any problems like unusual traffic errors or any other issues ? thanks in advance, ravi. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Re: Facebook Federated Login
No You can not use federated login for facebook.. i have used facebook login like this http://techsravi.blogspot.com/2011/05/facebook-login-on-google-app-enginejava.html 2011/7/8 Andrei Cosmin Fifiiţă andrei.fifi...@gmail.com I already use Federated login for google and yahoo (getting the login link with a simple call to createLoginUrl(domain, attrbutes, ...) , so i wanted to know if i could use this for facebook also On 7 July 2011 23:29, Nichole nichole.k...@gmail.com wrote: Or use OpenAuth instead? On Jul 5, 10:33 pm, Shash Joshi sh...@perfode.com wrote: I have used it, and it works great! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Introduce a delay in client side java code
I think you partially answered your self, If you cant do it on server then use Thread.sleep at client side. also you have option to use DelayQueue at client side(if its not GWT) http://download.oracle.com/javase/6/docs/api/java/util/concurrent/DelayQueue.html Put your all request on to this queue..and write one consumer which will read data from this queue and send it to GAE. Ravi On Tue, Jun 14, 2011 at 6:59 AM, Ronald dreamsky...@gmail.com wrote: I want to code on client side sending RPC to server per minute. As app engine does not allow Thread.sleep and timer, what is the workaround of that? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] GAE - Java - JSON?
Look into Spring 3.0+, they have this fucntionality inbuilt, Just by annotation you can specify whether eu want output as Json or xml etc. I havent tried it but i have seen such video fromSpringSource On Fri, May 20, 2011 at 1:11 PM, Pop Vasile vasile@gmail.com wrote: Hi, I want to create an app based on GAE / Java and I want to use JSON, for interaction with different GUIs (GWT, Android, etc.). I am looking in some books about GAE, but all I can find is RPC... Is there a book or is there a good link on how to implement JSON based services in GAE, using Java? Thanks! Vasile -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Re: how to transfer request to a different servlet ?
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 http://techsravi.blogspot.com/2011/05/managing-multiple-domain-and-sub-domain.html thanks, Ravi. On Sun, May 15, 2011 at 2:43 PM, Brandon Donnelson branflake2...@gmail.comwrote: 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 unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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] Facebook Login integration with java appengine
Hi, I am using http://code.google.com/p/facebook-java-api/ to login using facebook. But unable to do so as documenttaion is not quite completed there and posted my problem on this site but long time no response. I am sure in this group many people must have done with their java app to login using facebook. Could you please share your code or give me some guidance. Requirement: I will be dispalying google/yahoo/facebook logo on my site and when user click on Facebook logo it will take it to facebook page to authenticate.Once authenticate it will call my callback url and i should be able to query logged in user's name etc using facebook api(java). I am sorry posting a facebook login question here, but the project it self seems inactive and no one is responding. Thanks in advance Ravi. -- 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.
Re: [appengine-java] Re: Facebook Login integration with java appengine
Thanks all for your replys. SOme how i made it work with facebook_java_api project and posted the tutorial here http://techsravi.blogspot.com/2011/05/facebook-login-on-google-app-enginejava.html face4j looks quite promising too...i will look into it too. Thanks Ravi. On Sat, May 14, 2011 at 7:15 PM, Nischal nischalshett...@gmail.com wrote: And it works well on the Appengine! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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: 1MB URL Fetch limit
Hi Brandon, Is there a way to do this to Google Document List API to store into Google Docs? Ravi -- 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] Task Queue Strange Errors/Defects
Hi , I have a chained task which runs every 1 second(Still wondering how can i run it every 3 seconds) Task code is something like this try{ //Do something //read data store and update datastore }catch(Throwable ex){ logger.log(Level.Sever,ex.getMessage(),ex); }finally{ //add next task to queue to be run next Queue queue = QueueFactory.getQueue(queuename); queue.add(TaskOptions.Builder.withUrl(/tasks/mytask/+auctionId).method(Method.GET)); } Now i expect that one task will be finished and next will be added to the queue. 2 days back i found 4-5 tasks in the queue i dont know how they got there and today i found tasks queue empty. How it can be possible that queue can get more then 1 task at a time or it can get empty.I still have quota left for the day. My App Name is edurectory -- 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: [google-appengine] Re: Task Queue Strange Errors/Defects
I have not mentioned any retry count...so i guess whatever the default one is being used. (Actually i never want to retry if one fails next one will take care .. Do you know how to never retry a task.) On Sat, Apr 30, 2011 at 3:48 PM, Brandon Donnelson branflake2...@gmail.comwrote: Did they have a high retry count? -- 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- 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.
Re: [appengine-java] Re: can I send something like upload finished answere from HTTP servlet to my application ?
Hi Manvel, I dont see anything related to Channel in your code. Channel API is only for sending Message from SERVER TO CLIENT http://code.google.com/appengine/docs/java/channel/ Ravi. On Fri, Apr 29, 2011 at 11:50 AM, Manvel Saroyan saroy...@gmail.com wrote: Thank you Ravi Sharma for your fast answer. I already was suggested to use this style: // Add an event handler to the form. form.addFormHandler(new FormHandler() { public void onSubmit(FormSubmitEvent event) { // This event is fired just before the form is submitted. We can take // this opportunity to perform validation. if (tb.getText().length() == 0) { Window.alert(The text box must not be empty); event.setCancelled(true); } } public void onSubmitComplete(FormSubmitCompleteEvent event) { // When the form submission is successfully completed, this event is // fired. Assuming the service returned a response of type text/html, // we can get the result text here (see the FormPanel documentation for // further explanation). Window.alert(event.getResults()); } }); And now my application works ok... But I'm having problem of sending responses from server. For example if I want to tell my application that the file is too big please send the image that is not bigger than 1mb. I get something like: h2HTTP ERROR 500/h2 pProblem accessing /officemanagerver1/upload. Reason: /ppreExpected a redirect, tried to write content instead./ prep/phrismallPowered by Jetty:///small/ibr br br br br br br br br br br br br br br br br br br br [2:20:18 PM AMST] Manvel Saroyan: Here is how I'm tring to send information from server : res.setContentType(text/plain); res.getWriter().write(Hello, world); -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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] Indexing Problem...Defect
Hi, I got a weird index problem I had a entity claas A like his Class A{ //Few properties SetKey locationIds; Date lastSaveDate; } and i was querying it like this select * from A where locationIds = SomeKey order by lastSaveDate DESC It was working good... then i needed to add extra property adtype, so my class became Class A{ //Few properties SetKey locationIds; Date lastSaveDate; SetLong adType; } and my query is now(using low level datatsore APIs) select * from A where locationIds = SomeKey and adType in Lit of types order by lastSaveDate DESC So to run this query i need to create a new index and i created it I checked in admin panel all indexes were ready to server including new one now i had around 600 records in this table and i create done task to read it and save it again... and i expected that it will re create new indexes Now its not returning all my records..some records are not coming at all... so on pages where i use to get say 15 records now i get like 8-9 records just a subset is coming, and the records which are not coming should come and they full fill query criteria My older version of app is still shwoing those records but new is showing only subset of that data. and there are no errors in error log...its behaving as if these records do not exists. Please help i am not sure what is happening -- 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.
Re: [appengine-java] Re: Channel API
Thanks for the reply Moishe. This helps at least now i know i am going in right direction. On Mon, Apr 25, 2011 at 2:42 PM, Moishe mois...@google.com wrote: My question: 1) Is it the right way to distribute the message to each client. My app requirment is that everybody(online user) should receive the same message(i hope for some time my clients wont reach more then 8000 clients and then i can enable the billing) This is a reasonable way, yes. 2) how do i go ahead and do the load testing, connect 8000 clients. Could you use VMs? Maybe a bunch of Ubuntu instances running Chrome or something on EC2? 3) I am removing the tokens for all client which are being closed or going to other pages and i wont send any message to them in future, but is the Channel API connection is still alive on server, means if 8000 clients connected and 7000 closed the browser and my closeConnection function called properly then i will have only 1000 LiveChannels, so will i be able to make more connections or i need to wait for 2 hours when 7000 connections will expire/timeout No, the way the quota works is that you can only call createChannel 8000 times in 2 hours. We're working on improved quotas for channels now though. 4) Is this design efficient to handle large number of clients 5+ and if not how can we achieve it. This is currently the best way to handle lots of clients with the channel API. Thanks- -Moishe -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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: Channel API
any one?? any suggestionany thoughts??? -- 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] Channel API
Hi, I have just started using Channel API and it look to work fine. But there are few things i would like to know/clear/understand about my design. My Design: Currently when my site's page load it creates a token at server and injet into HTML page, GWT then read the token and start listening to this channel. I create the token at server side using request.getSession().getId(); and then save it in to datastore(LiveChannels entity) for later use to send the message back to client. I dodnt use the Cache as Cache may drop/remove some ids if it gets full/reach limit. I have created GWT RPC function which is called whenever user move away from that page(Event : onWIndowClose()), this function is closeConnection() and in this function i remove req.getSession().getId() from datastore(LiveChannels entity). Also i am keeping the connection date in this entity so that i can run regular tasks and see if some client have been connected for more then 2 hours and remove them from this entity and later i may implement Ping functionality from client every N minute and remove if some entity have not been pinged in last N minutes. Now whenever i have new messag to send to all client i read all LIveChannel entries from datastore(this will increase as number of user increases, say in future it can be easily around 5) and send message to them. I can see its working on my 3 computer and 12 browser combination running at the same time. My question: 1) Is it the right way to distribute the message to each client. My app requirment is that everybody(online user) should receive the same message(i hope for some time my clients wont reach more then 8000 clients and then i can enable the billing) 2) how do i go ahead and do the load testing, connect 8000 clients. 3) I am removing the tokens for all client which are being closed or going to other pages and i wont send any message to them in future, but is the Channel API connection is still alive on server, means if 8000 clients connected and 7000 closed the browser and my closeConnection function called properly then i will have only 1000 LiveChannels, so will i be able to make more connections or i need to wait for 2 hours when 7000 connections will expire/timeout 4) Is this design efficient to handle large number of clients 5+ and if not how can we achieve it. Thanks in advance Ravi -- 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.
Re: [appengine-java] How to model object with lots of small properties
May be you can do womething like this class HouseProperty{ Key id; String Name; } in above class you can create your all properties like hasAirCond,hasInternet etc. One property per Row. and in House you can have somethin glike this class House{ SetKey properties; } and if some house has airCond, then add one key to this collection house.properties.add(Key corresponding to airCon); if some house has two or more then house.properties.add(Key corresponding to airCon); house. properties.add(Key corresponding to hasInternet ); house. properties.add(Key corresponding to some other feature.); If you do like this, you dont need to worry about increasing the table columns later as you will be doing in your current solution. If new prooperty of a house comes just add another row and your solution will keep working. Thanks, Ravi. On Sun, Apr 10, 2011 at 7:22 AM, Thomas Wiradikusuma wiradikus...@gmail.com wrote: Hi guys, I want to model an object with lots of small properties, e.g.: House { boolean hasAirCond, boolean hasInternet, boolean nearSchool, etc; } Is this naive way the best way to model it? Is there any better GAE- way to do this? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Re: Persistant Objects to GWT front-end (and vice versa)
try Spring Roo On Wed, Jan 26, 2011 at 8:08 PM, GeneralSlaine lennart.ben...@gmail.comwrote: Thanks all for the feedback. I guess I will start with having a good look at Objectify. Other question:is there any open source project that you guys know of which fully generates a gui dynamically in GWT based on introspection of the objects? Based on this info a basic GUI with List, Detail, Create, Modify functionality could be generated (not code generated to be clear, dynamic generated GUI). Of course this approach will not do for all requirements but it could be usefull for some administrations screens. BR On 26 jan, 08:36, Didier Durand durand.did...@gmail.com wrote: Hi Jonas, Yes, moving to Objectify is definitely a good move: especially since the GAE google team pushes toward 3rd party package rather than datanucleus impl of JDO/JPA currently used by GAE. But, it doesn't sometimes prevent the need of DTO: if, for example (my own cas), you want all your back-end objects implemented with Objectify to inherit from an hierarchy of core objects delivering services to application objects via inheritance, you willat some point use DTOs because the high-level of the hierarchy have to be transcoded to js via GWT compiler and the may use JRE classes and methods not supported by GWT compiler. So, using Objectify is right but may not prove sufficient in all cases. regards didier On Jan 26, 8:18 am, Jonas Gehring gehr...@egotec.com wrote: hi, take a look at the persistance framework Objectify http://code.google.com/p/objectify-appengine/ Objectify entities can be used in GWT without the need for Data Transfer Objects. On 25 Jan., 21:52, GeneralSlaine lennart.ben...@gmail.com wrote: Hi all, I've been having some issues with getting my persistant object to GWT web front-end for example when implementing a web page to modify this object. Ideally I would like to be able to reuse the same class both for back-end as for front-end. So far, I have not managed. Instead I have a backbone class: Product and a front-end class FProduct. Communication between front-end and backbone is always via FProduct. So, when moving an object from backbone to web fornt, I have some sort of helper class to create an FProduct out of the real Product object. Major disavantage is of course the back and forward copying and all the code associated with this. Do you guys have better approaches? I'd love to hear your ideas/ best practises. BR -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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] JDO - Set property question
Hi, I have a entity like this Class AdPost{ ...few property SetKey locations; SetKey categories; } when i am running a query like select AdPost where locations = oneLocation categories == oneCategory (pseudo code) where oneLocation is one valid key of a location and oneCategory is a valid key of one category. After running this i expect to get list of AdPost but it returns me null and no error. Is it allowed to run euqality on two collection property in same query? Thanks, Ravi -- 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.
Re: [appengine-java] Re: JDO - Set property question
Thanks all. Stephen you are right '==' can be used in query. It appears it was just a problem of some old data .I created fresh database(local) and it worked and now its working on production too. Happy Coding. Ravi. On Fri, Jan 7, 2011 at 11:26 PM, Stephen Johnson onepagewo...@gmail.comwrote: That is incorrect. You can specify a filter using the == with a single value and a list or set such as query.setFilter(keywords == keywordParam); query.declareParameters(String keywordParam); This works just fine in JDO on AppEngine. On Fri, Jan 7, 2011 at 8:06 AM, Matthew Adams matt...@matthewadams.mewrote: Your query as written is testing for whether oneLocation is equal to locations and oneCategory is equal to categories. That will never be true (I hope), because a SetKey will never equal a Key. What you mean is are they **contained by** their respective collections: select AdPost where locations.contains(oneLocation) categories.contains(oneCategory) See section 14.6.2 (p.167) of the JDO 3.0 specification, covering JDOQL filter expressions. Page 170 contains a table of the methods allowed in JDOQL. The JDO 3.0 specification can be downloaded from http://jcp.org/aboutJava/communityprocess/mrel/jsr243/index3.html -matthew On Jan 7, 5:24 am, Ravi Sharma ping2r...@gmail.com wrote: Hi, I have a entity like this Class AdPost{ ...few property SetKey locations; SetKey categories; } when i am running a query like select AdPost where locations = oneLocation categories == oneCategory (pseudo code) where oneLocation is one valid key of a location and oneCategory is a valid key of one category. After running this i expect to get list of AdPost but it returns me null and no error. Is it allowed to run euqality on two collection property in same query? Thanks, Ravi -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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] Files Limitation 3000
Hello, After adding ExtJS GWT, the files count went to about 3500 after compilation. I am unable to deploy the project as GAE has a limit of 3000. I can put the java classes in JAR file, but the what can I do about the static files ? How can I overcome this problem ? Thanks, Ravi -- 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] Select query using LIKE
Hi All, Please provide inputs if we can use LIKE in GQL query or if any alternative is available for this. Thanks. Ravi -- 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.
Re: [appengine-java] Re: Mvenizing GAE/GWT project
actually i was following this link http://googlewebtoolkit.blogspot.com/2010/08/how-to-use-google-plugin-for-eclipse.html may be i am not able to understand it or i am doing something wrong... I have tried this roo pom too but i am not able to make it work. Do you guys have a sample pom for GAE+GWT(No extra Spring or roo related jars, just minimum GAE GWT jars and plugins only) project which a starter like me can use Thanks, Ravi. On Tue, Sep 21, 2010 at 6:06 PM, har_shan harsha...@gmail.com wrote: See http://googlewebtoolkit.blogspot.com/2010/08/how-to-use-google-plugin-for-eclipse.html Specifically, you might want to see the sample maven + gwt + gae project that they have given : http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/expenses/pom.xml -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Re: Mvenizing GAE/GWT project
Thanks Moritz for reply. So shall i create my project using this command or just create normal maven project and then convert it into GAE-GWT project manually by adding all dependecies? mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-gwt -DarchetypeVersion=0.7.1 -DgroupId=com.myapp.test -DartifactId=testapp I am new to maven, it looks quite easy but sometimes just stuck. I followed the documentation at that link and didnt work, will try again from scratch and then i will post the output. Thanks, Ravi. On Mon, Sep 20, 2010 at 10:30 PM, Moritz mor...@cloudme.org wrote: Maybe the maven-gae-plugin group would be more helpful. But: In the dependencies section, you should use variables like $ {gae.version} (without quotes). When defining variables in the properties section you should use gae.version1.3.7/ gae.version (without quotes). I'd recommend that you use the latest version of the plugin and install the appengine sdk using mvn gae:unpack. Mo. On 20 Sep., 21:05, Ravi Sharma ping2r...@gmail.com wrote: Hi All, I am trying to maenize my exisitng GAE-GWT project. So first i started with a sample new project as mentioned here http://code.google.com/p/maven-gae-plugin/ I created a project with this command as mentioned on this page mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-gwt -DarchetypeVersion=0.7.1 -DgroupId=com.myapp.test -DartifactId=testapp And then i imported this project in eclipse(Galileo) And nothing worked.(I did expected that it will work ) Version variables are defined like this $${Gae.version}}, which looks absurd and feel like this plugin is not good enough to start with. even after fixing these problems, it didint work at all. Does any one have any sample example/steps for GAE-GWT project with maven. Thanks, Ravi. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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] Mvenizing GAE/GWT project
Hi All, I am trying to maenize my exisitng GAE-GWT project. So first i started with a sample new project as mentioned here http://code.google.com/p/maven-gae-plugin/ I created a project with this command as mentioned on this page mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-gwt -DarchetypeVersion=0.7.1 -DgroupId=com.myapp.test -DartifactId=testapp And then i imported this project in eclipse(Galileo) And nothing worked.(I did expected that it will work ) Version variables are defined like this $${Gae.version}}, which looks absurd and feel like this plugin is not good enough to start with. even after fixing these problems, it didint work at all. Does any one have any sample example/steps for GAE-GWT project with maven. Thanks, Ravi. -- 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.
Re: [appengine-java] How to configure PHP, MySQL GAE
could you please provide the details about how to configure PHP with GAE? On Mon, Sep 13, 2010 at 4:33 PM, technut worldh...@gmail.com wrote: Hi I have configured PHP with GAE and it works for me. But i am not able to connect mySQL. I have reviewed that mysql doesn't support directly to GAE and JDO is one media for that. So how do i make connection from PHP to mySQL through JDO.? Its appreciate if you can reply me earliest. Thanks -B -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards Ravi Dhanwate -- 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.
Re: [appengine-java] Re: Confused by jdo relationships
Hi Poe, You have just implemented relational many to many relation. But this design is perfectly fine but just think if you need one to many relation only then in your case you will be writing 2 entities while u could just write one by saving catehoryGroup id in category it self. And when u want to read category and catehorygroup, u need to read three entities while u could read just two. So for one to many relations I will use unowned relation and save some write and read :). GAE doesn't say u can't think relational :). Thanks Ravi Sent from my iPhone On 7 Jul 2010, at 15:18, poe stefan.poe...@googlemail.com wrote: I've got a question regarding this. Isn't it kind of nicer regarding the design to not store relational Attributes in a core table/class. In the given example I would implement this like this: @PersistenceCapable public class Categories { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long Id; No owned or unowner object here ... } @PersistenceCapable public class CategoryGroups { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long Id; ... } @PersistenceCapable public class CategoryGroupRelation { @PrimaryKey @Persistent(mappedBy=category) private Long categoryId; @Persistent(mappedBy=categorygroups private Long categoryGroupId; } Isn't it better to design the tables this way? I don't like relational attributes in a core database class. What do you think? Greets Poe On 7 Jul., 01:25, AC acol...@gmail.com wrote: Thanks. That answers my question. On Jul 6, 3:18 pm, Ravi Sharma ping2r...@gmail.com wrote: You need to understand the concept of Entity group here, and need to understand the owned relation and unowned relation. Think of owned and unowned relation like this You(your house) and your TV has owned relationship, your house has TV, no ne can see it from outside, and if your friend want the same tv he need to buy the same TV and own it. And at one point if you ask who all watching my TV then it will be just you not your friend as he has his own TV(although same kind of TV). But You and your favourite movie theatre has unowned relationship, you dont own it, anyone who knows the address of theatre can go and watch movie. and at one moment 1000s of people might be watching the same movie/theatre Back to your question. Categories(3)/CategoryGroups(4) is an example for owned relation. CategoryGroup(4) will be available to Category(3) only and if you create another category Cateory(10) with same category group it will just create another version of categoryGroup CategoryGroup(11) in that category. But you may see that CategoryGroup 11 and CategoryGroup 4 both are Entertainment. In your case many categories can have same categoryGroup.So instead of using owned relationship, you should use unowned relationship. Instead of this @Persistent private CategoryGroups Group; define this @Persistent private Key categoryGroupId; and save key of CategoryGroup rather then full object. (Dont buy a TV for every other rmovie you want to watch, just buy a movie theatre ticket go there and use that :) ) I hope u get the idea, you can learn more from here http://code.google.com/appengine/docs/java/datastore/relationships.html spare me if you dont like my example... :) Ravi. On Tue, Jul 6, 2010 at 5:47 PM, AC acol...@gmail.com wrote: I just started fooling around w/ GAE this weekend. I have a Categories class and a CategoryGroup class. The idea is that every category must be grouped. For example the CategoryGroup Entertainment can be assigned to many Categories, such as movies, music and television. Here are my classes. @PersistenceCapable public class Categories { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key Id; @Persistent private CategoryGroups Group; @Persistent private boolean IsDeleted; @Persistent private String Name; @Persistent private Date CreateDate; @Persistent @Column(allowsNull=true) private Date ModifiedDate; } @PersistenceCapable public class CategoryGroups { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key Id; @Persistent boolean IsDeleted; @Persistent String Name; @Persistent Date CreateDate; @Persistent @Column(allowsNull=true) Date ModifiedDate; } First I add a record to CategoryGroups. When I query all, the reult is : CategoryGroups(2) Next, I add a record to Categories. When I query all CategoryGroups, the result is : Categories(3)/CategoryGroups(4) CategoryGroups(2) I do not doubt that this works as it was designed to, however, coming
[appengine-java] DataNucleus Enhancer failed to run
Hi, I was working happily, changed few lines of java code(didnt touch any eclipse setting or installed any thing new or added extar jar in classpth) and then started getting follwoing error. Please help spent half a day and not able to understand how this error emerged. Googled this error an dpeople are saying that if classpth goes long then this error comes but i have not changed classpth since few days, just writing new java files. DataNucleus Enhancer has encountered a problem Error Sun Jul 04 18:45:14 BST 2010 Cannot run program C:\Program Files (x86)\Java\jdk1.6.0_17\bin \javaw.exe (in directory Y:\projects\New-Eclipse-Workspace \TestGwt): CreateProcess error=87, The parameter is incorrect eclipse.buildId= java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product -clean java.io.IOException: Cannot run program C:\Program Files (x86)\Java \jdk1.6.0_17\bin\javaw.exe (in directory Y:\projects\New-Eclipse- Workspace\TestGwt): CreateProcess error=87, The parameter is incorrect at java.lang.ProcessBuilder.start(Unknown Source) at com.google.gdt.eclipse.core.ProcessUtilities.launchProcessAndActivateOnError(ProcessUtilities.java: 195) at com.google.appengine.eclipse.core.orm.enhancement.EnhancerJob.runInWorkspace(EnhancerJob.java: 78) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java: 38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.init(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 5 more -- 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: Junit Problem
Sorry for late reply... there are few jars like appengine-testing.jar appengine-local-rutime-shared.jar etc. Basically when you create a new GAE project the eclipse plugin copies some jars automatically in war folder, which are required when you will be running ur application on GAE server, but it doesnt copy few test jars which are required only for local dev env and testing. So what i did i compared jars in my war folder and GAE SDK installed folder. I found that few of jars not included so i included all in my Eclipse build path/Junit run path(but didnt copy into war folder) and that worked for me and then i didnt care to check which were the jars actually needed and which were not as i included all jars. But somehow in docs they have mentioned to included only one or two jars and with these jars junit doesnt work. I hope it will help you. Thanks, Ravi. On Jun 7, 5:43 am, brendan brendanpdohe...@gmail.com wrote: Hi Ravi, I have the same problem. Are you able to explain your solution in more detail? What jars were not mentioned? On May 19, 6:55 pm, Ravi ping2r...@gmail.com wrote: Finallyfoundthe problem that in documentation itsnotmentioned that few of the jars need to be included. They did mention few butnotall, may be documentation need to be fixed. So it worked now. but now getting another problem, data isnotbeing persisted in local file. I am using following code testLocalDatastoreServiceTestConfig = new LocalDatastoreServiceTestConfig(); testLocalDatastoreServiceTestConfig.setBackingStoreLocation(C:\ \test.bin); testLocalDatastoreServiceTestConfig.setNoStorage(false); testHelper = new LocalServiceTestHelper(testLocalDatastoreServiceTestConfig); It tells me The backing store, c:\test.bin, doesnotexist. It will be created. But it is never created and i can see through logs that entity i created was actually worked as i could print Key id field of it. which comes as User(1), but then i cannotquery it using Id or any other field as it was never persisted on file system. Can you please help. I am using SDK 1.3.3 Thanks, Ravi. On May 18, 8:25 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi, First time i am trying to run local junit test in eclipse. I am following exactly what is written herehttp://code.google.com/appengine/docs/java/tools/localunittesting.html but no use, i am getting following error. com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'datastore_v3' or call 'RunQuery()' wasnotfound. at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call( ApiProxyLocalImpl.java:284) at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call( ApiProxyLocalImpl.java:264) at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463) at java.security.AccessController.doPrivileged(Native Method) at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)Query Ran Succesfully Returning results Tear Down at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j ava:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 908) at java.lang.Thread.run(Thread.java:619) I searched on GAE group andfoundfew things like i need to include following code in the setup and tear method. I dont see these methodas in documentation.. Also i tried to add in my code but then i dont find in app engine jars. So dont know what to do. ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment()); and ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(.)){}); (Taken from this linkhttp://groups.google.com/group/google-appengine-java/browse_thread/th... (Max Ross's Reply)) Is any thing missing on Docs on this linkhttp://code.google.com/appengine/docs/java/tools/localunittesting.html, as i am following it exactly written or may be my eyes arenotable to find what i am missing. Please help. Thanks, Ravi. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- 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
Re: [appengine-java] One-to-many relationship
ur DB connection is closed by the time you try to select Address list(i am assuming writing phone is just a typo) first time. Either select/iterate the list before closing the pm in method userDao.getUser(TEST_USER_ID); or use (defaultFetchGroup = true) for ListAddress addresses declartion like this @Persistent (defaultFetchGroup = true) private ListAddress addresses On Tue, Jun 15, 2010 at 7:15 PM, Tony porkrice...@gmail.com wrote: I've followed the GAE docs on setting up one-to-many relationship but I'm still having trouble in retrieving the collection data back. I have no problem getting the other non-collection properties back. Here are my classes: @PersistenceCapable public class User{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String uniqueId; @Persistent private String email; @Persistent private ListAddress addresses = new ArrayListAddress() ; ... } @PersistenceCapable public class Phone{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String number; ... } public class UserDaoImpl implements UserDao { public void insertUser(User user) { if(user.getKey() == null) { com.google.appengine.api.datastore.Key key = KeyFactory.createKey(User.class.getSimpleName(), user.getEmail()); user.setKey(key); } PersistenceManager pm = PersistenceManagerWrapper.getPersistenceManager(); notNull(user); try { pm.makePersistent(user); } finally { pm.close(); } } @SuppressWarnings(unchecked) public User getUser(String uniqueId) { PersistenceManager pm = PersistenceManagerWrapper.getPersistenceManager(); Query query = pm.newQuery(User.class); query.setFilter(uniqueId == uniqueIdParam); query.declareParameters(String uniqueIdParam); User user = null; try { ListUser users = (ListUser)(query.execute(uniqueId)); //TODO abstract this if(users.size() 0) user = users.get(0); } finally { pm.close(); } return user; } } public class UserDaoImplTest { @Test public void getUserTest() { User user = createTestUser(); assertNotNull(The user object should not be null, user); userDao.insertUser(user); User returnedUser = userDao.getUser(TEST_USER_ID); assertNotNull(The returnedUser object should not be null, returnedUser); Assert.assertPropertyEqualsExcludeProperties(User Object, user, returnedUser, ); } } When I run the test, all the properties for User is populated but the list of Phone if I get is empty. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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] NeedIndexException - in production server
Hi Google Team, All these days our application was working fine and we have not changed any datastore index or codebase of our application. Everyday we upload new set of data to our application. Today also we have uploaded new set of data but today after uploading the data we are getting very strange exception as below: com.google.appengine.api.datastore.DatastoreNeedIndexException: The built-in indices are not efficient enough for this query and your data. Please add a composite index for this query.. An index is missing but we are unable to tell you which one due to a bug in the App Engine SDK. If your query only contains equality filters you most likely need a composite index on all the properties referenced in those filters. We are worried after seeing the above exception, we dont have any complex queries, all the queries contain equals to filter (==). We tested the same set of data and query in our development environment, it is working fine. For testing purpose, we uploaded the same set of data to our other testing appengine applcation, it is working fine there also. Only in our production system, we are getting DatastoreNeedIndexException. Could you please confirm is there any problem with the datastore indexing. Data stored in our production datastore is more than 0.5 GB, will thee be any problem in indexing if there is high amount of data. Application ID: bigpaisa2.appspot.com Latest application version: http://061102.latest.bigpaisa2.appspot.com - In this version DatastoreNeedIndexException is occuring. Please help us as soon as possible. Thanks, Ravi -- 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: Records Count
Google app engine designed to work for any numbers of records with in minimum time, so SQL features like counting the records whenever needed is not supported. So you need to take care of such counter by urself at the time of adding or deleting the records in a table/entity. If you just want total number of records and dont care if counting happened in last 24 hours then look into low level api for datastore statistics, GAE refreshes total count every 24 hours and you can read the total count from there. And if you want count of records with some where clause, then you need to maintain it. like if u want like this select count(0) from tb where tb.propA='someValue' then you may need to create a new entity say counterForTb, and have few fields entityName and count and where clause columns and whenevr you add a new record in tb then increase the count of that record in counter table and on delete decrease it. Something for google guys Just realized that all columns are indexed unless we specify to not to index, and there must be some index meta data/statistics saved somewhere in google data stores about index(like total records matching to this index). And if that stats can be accessible through some APIs then we may be able to get total count just by reading data from indexes stats. Is this something feasible? On Jun 11, 11:39 am, RAVINDER MAAN rsmaan...@gmail.com wrote: How can we get records count for a query in JDO. In sql we have select count(*) from table_name i want to get number of records returned by a query. what is the efficient way to do that.One option is to use size() function .I think it is not best way. -- 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: Records Count
Have u solved the problem of like SQL? If yes then please share with me as i have not been able to solve it. On Jun 11, 2:53 pm, RAVINDER MAAN rsmaan...@gmail.com wrote: number of employee entities is going to be high .So i guess that possibility of getting more then 1000 employees for any search is quite high. On Fri, Jun 11, 2010 at 6:56 PM, John Patterson jdpatter...@gmail.comwrote: A lot depends on how many Employee entities you have. You could do a sub search for each of the 4 employee types and use COUNT to get the results. This will only work up to 1000 employees per employee type. Twig can execute queries in parallel so this would take no more time than running your original query. On 11 Jun 2010, at 19:39, RAVINDER MAAN wrote: Thanks for your reply Ravi let me explain the entire scenario.I have an employee entity .User can search employees by giving part of name .There are four type of employees .I have to show number of employees matching user search criteria for every type of employee under different tabs.Actual results are to be displayed only if user open that tab. In SQL term we could write following query Select count(*) from employee where name like '%searchname%' and type ='A' ; My first problem is that i dint find any equivalent of like operator.Is there any way to do it? Secondly we can not keep record count for each search combination.what will you suggest for this case? Thanks once again. On Fri, Jun 11, 2010 at 4:23 PM, Ravi ping2r...@gmail.com wrote: Google app engine designed to work for any numbers of records with in minimum time, so SQL features like counting the records whenever needed is not supported. So you need to take care of such counter by urself at the time of adding or deleting the records in a table/entity. If you just want total number of records and dont care if counting happened in last 24 hours then look into low level api for datastore statistics, GAE refreshes total count every 24 hours and you can read the total count from there. And if you want count of records with some where clause, then you need to maintain it. like if u want like this select count(0) from tb where tb.propA='someValue' then you may need to create a new entity say counterForTb, and have few fields entityName and count and where clause columns and whenevr you add a new record in tb then increase the count of that record in counter table and on delete decrease it. Something for google guys Just realized that all columns are indexed unless we specify to not to index, and there must be some index meta data/statistics saved somewhere in google data stores about index(like total records matching to this index). And if that stats can be accessible through some APIs then we may be able to get total count just by reading data from indexes stats. Is this something feasible? On Jun 11, 11:39 am, RAVINDER MAAN rsmaan...@gmail.com wrote: How can we get records count for a query in JDO. In sql we have select count(*) from table_name i want to get number of records returned by a query. what is the efficient way to do that.One option is to use size() function .I think it is not best way. -- 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.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards, Ravinder Singh Maan -- 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. -- 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.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards, Ravinder Singh Maan -- 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
Re: [appengine-java] Re: Date based sorting and result pagination
you are already sorting on date..and that can be best candidate for paging too but u may need indexes in both direction(asc,desc) for creation date. lets say ur entity has fololowing prooerty on which u will fliter propA propB creationData so u will write basic query like select * from entity where propA='something' and propB='xyz' order by creationDate asc. once you get this result, keep this first record's creation date and last record's date, may be send it to client and attach it to prev, next links. At this stage prev will be null(as its start of the paging.i.e. first page) and next will be creation date of last record. If user click Next execute a query like this select * from entity where propA='something' and propB='xyz' and creationDatedateSuppliedByClient order by creationDate asc..Here dateSuppliedByClient is creationDate of last record of above query. again do the same thing bind the creationDate first record to previous and last record to Next. so for every next you will keep executing second query now if user click previous, then execute bit different query select * from entity where propA='something' and propB='xyz' and creationDatedateSuppliedByClient order by creationDate *desc*.Here dateSuppliedByClient is creationDate of first record of above query. NOTE : creationDate condition clause has changed and sorting order has changed So u will have following Indexes propA ^ propB^ creationDate^ propA ^ propB^ creationDate(Desc) On Thu, Jun 10, 2010 at 7:34 PM, RAVINDER MAAN rsmaan...@gmail.com wrote: I forsee that there will be around 100 records or entities in one table.I have to do filtering based on one or two ,sorting based on creation date then display results through pagination with back and forth traversing of records.so what will be the best strategy in this case. On Thu, Jun 10, 2010 at 10:31 PM, Nacho Coloma icol...@gmail.com wrote: Cursors is the best choice, but they can only be used to paginate forward. You will have to use your own hacks to allow more than one page. setRange() is more flexible, but should give you worse performance. On Jun 10, 3:27 pm, RAVINDER MAAN rsmaan...@gmail.com wrote: I am using JDO .So which option is best cursors or setRange? On Wed, Jun 9, 2010 at 1:47 PM, Nacho Coloma icol...@gmail.com wrote: You should specify if you are using JDO, JPA or other. SimpleDS has a PagedQuery implementation that can be ported to your own environment. Look for getFetchOptions() in this link: http://code.google.com/p/simpleds/source/browse/trunk/src/main/java/o. .. This will only resolve the paging, and it's not optimal but convenient (can jump to a specific page etc). For an optimal solution, use cursors. On Jun 9, 7:36 am, RAVINDER MAAN rsmaan...@gmail.com wrote: Hello all how can i get my query result sorted based on creationdate and also i want to do pagination for the same.what is the best way to do that.can anybody refer me any example code? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards, Ravinder Singh Maan -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards, Ravinder Singh Maan -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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: JDO QUery to filter on List property
No one know??.google guys any response? On May 23, 3:16 am, Ravi Sharma ping2r...@gmail.com wrote: Hi All JDO Experts, I am trying to write JDO query to query on List property but didnt find in documentaion on google app site. Class InterestedParty { Key id; ListKey parties; } So basically now i want to query all IntrestedParties where parties list contain User(1) or User(5) etc. So i expect query should be something like this Select InterestedParty from InterestedParty where parties contain(use1Key,user2Key ...etc) Is it right? Can i get exact syntax from some where. Example Lets say i have 3 ENtity of this lcass saved in db will follwoing data A InterestedParty{ id(1) parties(User(1),User(4),User(6)) } B InterestedParty{ id(2) parties(User(1)) } C InterestedParty{ id(3) parties(User(4)) } So if i query for parties User(1) and User(4), then all the three records will be returned, if i query for parties User(1) then record A and B will be returned.. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- 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] Problem getting list of JDO objects with List of of keys
Hi, I have a list of Key and i want to get Entity for all these key using JDO. Is it possible in JDO? Having a hard time to search through internet and not finding it. Tried using pm.getObjectsById(Collection), but it says Object not found with keys present in the list. I wrote following code for this PersistenceManager pm = DbSessionManager.getInstance().startDbSession(); ListKey keyList = new ArrayListKey(); Key oneKey = KeyFactory.createKey(User, 9); keyList.add(oneKey); ListUser users = (ListUser)pm.getObjectsById(keyList); (Note: s after object) abovce code throws Exception that User(9) not found but it does exists in datastore and if i do User users = (User)pm.getObjectById(oneKey);(Note: no s after object) it returns the User(9) I also tried using Low level API like this and it works, but only problem is that it doesnt return its owned properties(see User class at the end, openIds are not returned and its always null, even though it does exists). public MapKey, Entity getObjectsById(ListKey ids) throws AppException { DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); MapKey, Entity data = ds.get(ids); return data; } class User{ Key id; String firstName; String lastName; ListOpenId openIds; } -- 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] JDO QUery to filter on List property
Hi All JDO Experts, I am trying to write JDO query to query on List property but didnt find in documentaion on google app site. Class InterestedParty { Key id; ListKey parties; } So basically now i want to query all IntrestedParties where parties list contain User(1) or User(5) etc. So i expect query should be something like this Select InterestedParty from InterestedParty where parties contain(use1Key,user2Key ...etc) Is it right? Can i get exact syntax from some where. Example Lets say i have 3 ENtity of this lcass saved in db will follwoing data A InterestedParty{ id(1) parties(User(1),User(4),User(6)) } B InterestedParty{ id(2) parties(User(1)) } C InterestedParty{ id(3) parties(User(4)) } So if i query for parties User(1) and User(4), then all the three records will be returned, if i query for parties User(1) then record A and B will be returned.. -- 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.
Re: [appengine-java] Re: Junit Problem
What about the code which reads the data? How we will test it if can't persist the data in test cases. Sent from my iPhone On 21 May 2010, at 15:33, Unni Panicker o4tec...@gmail.com wrote: When you run the server , data gets persisted and u can view the data using the console http://localhost:/_ah/admin. But for the test utilities it is not persisted. It is preferable that data is not persisted for two reasons. 1. It is better to start each test from a clean plate. 2. Persistence itself is not your code and there is no need to test it. I believe this is the thinking behind it. Even when I tried with a backing file, I could not retrieve the objects that I persisted in my previous method call. If any one has a better explanation, please. On Fri, May 21, 2010 at 3:11 AM, bufferings bufferi...@gmail.com wrote: hi I posted a sample with @BeforeClass and @AfterClass a few minutes ago. FYI: Somehow the setStoreDelayMs(1) leaves the data in the file, if you call helper.tearDown(). http://groups.google.com/group/google-appengine-java/browse_thread/thread/68fa07d96fe929e8 == @Before public void setUp() { LocalDatastoreServiceTestConfig config = new LocalDatastoreServiceTestConfig(); config.setNoStorage(false); config.setStoreDelayMs(1); helper = new LocalServiceTestHelper(config); helper.setUp(); } @After public void tearDown() { helper.tearDown(); //ApiProxy.setDelegate(null); //ApiProxy.setEnvironmentForCurrentThread(null); } == -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are 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: Junit Problem
Sorry to send a mail again. But can any one please help. I tried searching on group but didnt found a a solution till now. Main problem is that data is not being persisted on file system. If you have any example which works(example on Google docs doesnt work, i have tried that) then please send it to me. Thanks, Ravi. On May 19, 7:55 am, Ravi ping2r...@gmail.com wrote: Finally found the problem that in documentation its not mentioned that few of the jars need to be included. They did mention few but not all, may be documentation need to be fixed. So it worked now. but now getting another problem, data is not being persisted in local file. I am using following code testLocalDatastoreServiceTestConfig = new LocalDatastoreServiceTestConfig(); testLocalDatastoreServiceTestConfig.setBackingStoreLocation(C:\ \test.bin); testLocalDatastoreServiceTestConfig.setNoStorage(false); testHelper = new LocalServiceTestHelper(testLocalDatastoreServiceTestConfig); It tells me The backing store, c:\test.bin, does not exist. It will be created. But it is never created and i can see through logs that entity i created was actually worked as i could print Key id field of it. which comes as User(1), but then i can not query it using Id or any other field as it was never persisted on file system. Can you please help. I am using SDK 1.3.3 Thanks, Ravi. On May 18, 8:25 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi, First time i am trying to run localjunittestin eclipse. I am following exactly what is written herehttp://code.google.com/appengine/docs/java/tools/localunittesting.html but no use, i am getting following error. com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'datastore_v3' or call 'RunQuery()' was not found. at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call( ApiProxyLocalImpl.java:284) at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call( ApiProxyLocalImpl.java:264) at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463) at java.security.AccessController.doPrivileged(Native Method) at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)Query Ran Succesfully Returning results Tear Down at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j ava:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 908) at java.lang.Thread.run(Thread.java:619) I searched on GAE group and found few things like i need to include following code in the setup and tear method. I dont see these methodas in documentation.. Also i tried to add in my code but then i dont find in app engine jars. So dont know what to do. ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment()); and ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(.)){}); (Taken from this linkhttp://groups.google.com/group/google-appengine-java/browse_thread/th... (Max Ross's Reply)) Is any thing missing on Docs on this linkhttp://code.google.com/appengine/docs/java/tools/localunittesting.html, as i am following it exactly written or may be my eyes are not able to find what i am missing. Please help. Thanks, Ravi. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- 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: Junit Problem
no for me it can store any where, i dont care. I did commented this line testLocalDatastoreServiceTestConfig.setBackingStoreLocation(C:\ \test.bin); but it still didn't work.It gave the same line that file do not exists in the path(war/WEB-INF/appeninge-generated/local_db.bin ) you just mentioned and it will create new one, but it never created this file. I know in memory data is proper but it never get persisted and my subsequent test cases can not use it. Can you please send me your example which you are running so that i can see if i am missing anything. Thanks, Ravi On May 20, 3:50 pm, Tristan tristan.slomin...@gmail.com wrote: Is there a specific reason you need to store your data in that particular place? I never specified storage and it automatically created one for me and it persists just fine in war/WEB-INF/appeninge- generated/local_db.bin On May 20, 5:41 am, Ravi ping2r...@gmail.com wrote: Sorry to send a mail again. But can any one please help. I tried searching on group but didnt found a a solution till now. Main problem is that data is not being persisted on file system. If you have any example which works(example on Google docs doesnt work, i have tried that) then please send it to me. Thanks, Ravi. On May 19, 7:55 am, Ravi ping2r...@gmail.com wrote: Finally found the problem that in documentation its not mentioned that few of the jars need to be included. They did mention few but not all, may be documentation need to be fixed. So it worked now. but now getting another problem, data is not being persisted in local file. I am using following code testLocalDatastoreServiceTestConfig = new LocalDatastoreServiceTestConfig(); testLocalDatastoreServiceTestConfig.setBackingStoreLocation(C:\ \test.bin); testLocalDatastoreServiceTestConfig.setNoStorage(false); testHelper = new LocalServiceTestHelper(testLocalDatastoreServiceTestConfig); It tells me The backing store, c:\test.bin, does not exist. It will be created. But it is never created and i can see through logs that entity i created was actually worked as i could print Key id field of it. which comes as User(1), but then i can not query it using Id or any other field as it was never persisted on file system. Can you please help. I am using SDK 1.3.3 Thanks, Ravi. On May 18, 8:25 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi, First time i am trying to run localjunittestin eclipse. I am following exactly what is written herehttp://code.google.com/appengine/docs/java/tools/localunittesting.html but no use, i am getting following error. com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'datastore_v3' or call 'RunQuery()' was not found. at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call( ApiProxyLocalImpl.java:284) at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call( ApiProxyLocalImpl.java:264) at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463) at java.security.AccessController.doPrivileged(Native Method) at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)Query Ran Succesfully Returning results Tear Down at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j ava:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 908) at java.lang.Thread.run(Thread.java:619) I searched on GAE group and found few things like i need to include following code in the setup and tear method. I dont see these methodas in documentation.. Also i tried to add in my code but then i dont find in app engine jars. So dont know what to do. ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment()); and ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(.)){}); (Taken from this linkhttp://groups.google.com/group/google-appengine-java/browse_thread/th... (Max Ross's Reply)) Is any thing missing on Docs on this linkhttp://code.google.com/appengine/docs/java/tools/localunittesting.html, as i am following it exactly written or may be my eyes are not able to find what i am missing. Please help. Thanks, Ravi. -- 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
[appengine-java] Re: Junit Problem
Finally found the problem that in documentation its not mentioned that few of the jars need to be included. They did mention few but not all, may be documentation need to be fixed. So it worked now. but now getting another problem, data is not being persisted in local file. I am using following code testLocalDatastoreServiceTestConfig = new LocalDatastoreServiceTestConfig(); testLocalDatastoreServiceTestConfig.setBackingStoreLocation(C:\ \test.bin); testLocalDatastoreServiceTestConfig.setNoStorage(false); testHelper = new LocalServiceTestHelper(testLocalDatastoreServiceTestConfig); It tells me The backing store, c:\test.bin, does not exist. It will be created. But it is never created and i can see through logs that entity i created was actually worked as i could print Key id field of it. which comes as User(1), but then i can not query it using Id or any other field as it was never persisted on file system. Can you please help. I am using SDK 1.3.3 Thanks, Ravi. On May 18, 8:25 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi, First time i am trying to run local junit test in eclipse. I am following exactly what is written herehttp://code.google.com/appengine/docs/java/tools/localunittesting.html but no use, i am getting following error. com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'datastore_v3' or call 'RunQuery()' was not found. at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:284) at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:264) at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463) at java.security.AccessController.doPrivileged(Native Method) at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)Query Ran Succesfully Returning results Tear Down at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) I searched on GAE group and found few things like i need to include following code in the setup and tear method. I dont see these methodas in documentation.. Also i tried to add in my code but then i dont find in app engine jars. So dont know what to do. ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment()); and ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(.)){}); (Taken from this linkhttp://groups.google.com/group/google-appengine-java/browse_thread/th... (Max Ross's Reply)) Is any thing missing on Docs on this linkhttp://code.google.com/appengine/docs/java/tools/localunittesting.html, as i am following it exactly written or may be my eyes are not able to find what i am missing. Please help. Thanks, Ravi. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- 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: Persistent Identity of JPA Entities
Just to put my 2 cents... Even in JDO same thing happening. I got frustrated first but then i just accepted it/ignored it(5-6 months back)...that may be they wont fix it or they are not able to do it on GAE... But yes you are right frameworks like Hibernate does provide key as soon as you call the persist/save method and doesn't wait for commit call. And i hope datanucleus(id) is not the official representative of Data Nucleus framework/company, and if that is the case then it is sad that such harsh reply are coming from official representative. I have never seen such reply from google guys, we ask so basic/absurd/stupid/naive questions all the time and they always reply politely and definitely don't end the discussion with END. Ravi. On May 19, 7:06 am, Luca luca.mas...@gmail.com wrote: End Very kind from you !! And you haven't asked twice. Anyway I will be back on the main argument that is the fact that I think DataNucleus is not working like all other JPA engines. Those lines you reports only says that flush synchronize the state to the underling database, nothing strange on that, is the behaviour I expect. And regarding the footnote I think that this is a very subtle case. I'm talking about a simple code like tx.begin(); Luogo luogo = new Luogo(); luogo.setDescrizione(Ulisse Dini); em.persist(luogo); System.out.println(Luogo Key: +luogo.getKey()); tx.commit(); there null will be printed only by DataNucleus, so that I have to design my code in a way specific to that persistence provider. If this is what you desire, well, you are sure in the right way. And also notice that the reference implementation (EclipseLink) works the way I expect, so please take a look at it. On May 19, 7:26 am, datanucleus andy_jeffer...@yahoo.com wrote: I've already asked you twice to post your class. You haven't. That provides no context for any comment, and I've already told you why datastore operations are delayed until commit/flush. Why do you think there's a flush() method if you think things ought to go straight to the datastore ? JPA2 spec page 29 footnote 12. spec[12] If the application does not set the primary key attribute corresponding to the relationship, the value of that attribute may not be available until after the entity has been flushed to the database./ spec spec/** * Synchronize the persistence context to the underlying database. * @throws PersistenceException if the flush fails */ public void flush();/spec spec• If X is a new entity, it becomes managed. The entity X will be entered into the database at or before transaction commit or as a result of the flush operation./ spec http://www.datanucleus.org/products/accessplatform/jpa/transaction_ty... End. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- 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: Facebook/social website design problem
Thanks Tristan I like the idea of UserRegistrar class, may be i will use this to keep the Friend relation. But still worried about UserActivity as GAE doesn't support more then 30 parameters in contains query. So i will be able to query UserActivity only for 30 users at one time(then run remaining in the batch of 30 each) and then i will need to sort them in memory for latest activities and it will not be scalable solution.So as Baz said need to look into write once kind of solution. And make sure data is not being duplicated a lot but i will just keep ids in every user's activity table. So something liek this class Acitivty { Key id; String status; } Class UserAcitivity{ Key id; Key actitityId; //Id of Activity Class Key userId; //Id of User Classm whome this UserActivity belongs boolean myUpdate;//it will distinguish if this activity is mine or my friends/some group etc } So basically if i want to update my status as Hurray i got some solution. Then i will create one row for class Activity where my status will be saved. Then i will create one row in UserActitvity where my userId,just created activityId and myUpdate=true. And say i have 500 Friends, then i will create 500 more rows with userId as my friend's id, activityId as what i created above and myUpdate as false;(And i hope i will be able to finish it before Big Daddy DeadlineExceedException comes to me :) ) So when i want to see all updates including mine and friend's on my wall, then i will query this table(UserActivity) with userId=myId order by updationDate and according to my web page i may be interested in top 30 or 50 or 100 results only and then for that i can lookup Activity table to get exact data. And if retrieval of data from Activity class is pain, then i may merge it with the userActivity and duplicate the data like activityStaus in 500 rows(just to make retrieval faster). Feel free to comment on this design. (There is always a better solution) Thanks, Ravi. On May 19, 1:13 am, Tristan tristan.slomin...@gmail.com wrote: What about doing this? Have your user activity object keep track of friends as well... So something like Class UserActivity { Key id; String statusMessage; Date time; User user; ListKey friends } Then when you want to display the wall, you just query all User Activity objects that have your user in it. (for one, I would not user ListKey because you have a potential of running out of space, ie 1MB and then you start getting errors, but it's a design decision). But the above saves you a lot of time... because when User Activity is generated by user1 (who is friends with user2), you just copy the user1's friend list into it while you're creating it, so just 1 write operation. Then if you're user2 and want to see your wall, just run a query against User Activity where friends = user2Key. 1 query operation. As far as how to be friends of friends, instead of storing the relationship in your User object, have something like UserRegistrar that is essentially this: UserRegistrar { ListKey users } Most of the time you will just have 2 users in that list, but what that buys you is being able to do 1 write and document relationship going both ways. Then if you want to find friends of user2, you just query UserRegistrar where friends = user2. When you have all those, combine the list and every user listed (except listing of user2) is a friend of user2. So again, 1 query operation. On May 18, 1:47 pm, Baz b...@thinkloop.com wrote: I think you're best bet is to do all the work in the write, and have each profile's page constantly updated and ready for an extremely simple read. For one, this will significantly reduce your costs, because everyone reads more than they write. Two, by the time you get big enough to surpass the 30 second limit, you will probably be able to use Background servers capable of running for longer than 30s (http://code.google.com/appengine/docs/roadmap.html) Cheers, Baz On Tue, May 18, 2010 at 8:43 AM, Ravi ping2r...@gmail.com wrote: Thanks Li for looking into it. For me 1-2 minute delay is fine, problem is like contains query(for finding friend's data), i can pass max 30 user id, so basically on one page i will be able to show max 30. But in other case where wall type data need to be saved queries need to perform faster and need to break the limit of 30 as i would like to get latest activity from all of my friends rather then first 30 friends. So if i have 300 friends i may need to run such query 10 times in the batch of 30 nad each time need to go through activties and sort them out which will be very time consuming and sure user will not like the response time. I am thinking why not do it at the write time that my updates goes to all of friend's domain but again in one 30 second request i will try to create/update my domain(user Data) + 300(assuming i have 300 friends) other
Re: [appengine-java] SDK 1.3.4 released!
I Downloaded the SDK and tried to create SDK 1.3.4 in eclipse. The Zip file was unzipped as D:\library\appengine-java-sdk-1.3.4, so while adding SDK in eclipse i choose this as Installation dir. But after choosing it says failed to initialize App ENgine SDK at D:\library\appengine-java-sdk-1.3.4. Am i doing something wrong here?. When this version will be available through eclipse site directly? Thanks, Ravi On Wed, May 19, 2010 at 6:30 PM, Ikai L (Google) ika...@google.com wrote: Hello, App Engine developers! Hopefully you're all following along the Google I/O keynote and seen our blog posts with new App Engine annoucements. Well, we've got another exciting announcement: SDK 1.3.4 is LIVE! Get it below: http://code.google.com/appengine/downloads.html Release notes are below: Java --- Version 1.3.4 = - Client side bulkloader available with the Python SDK that has a new configuration syntax and wizard for easier import/export with the datastore. Can be used by enabling remote_api in your Java application - Applications can now be configured to authenticate with OpenID by selecting the OpenID option when creating your application in the admin console http://code.google.com/p/googleappengine/issues/detail?id=248 http://code.google.com/p/googleappengine/issues/detail?id=56 - New API to allow App Engine apps to act as OAuth service providers http://code.google.com/p/googleappengine/issues/detail?id=919 - The version update check in the Java SDK now uses https - Allow full access to javax.el.* http://code.google.com/p/googleappengine/issues/detail?id=3157 - Increased the timeout during deployment to 15 minutes - Fixed an issue with JPA where an illegal cast exception was thrown during the fetch of integer fields - MemcacheService.setNamespace() is deprecated in favor of MemcacheServiceFactory.getMemcacheManager(namespace) - Support in the SDK for Java 1.5 is being deprecated. These warnings now appear when starting the SDK -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine ppengine target=_blankhttp://www.reddit.com/r/appengine -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] SDK 1.3.4 released!
In my folder D:\library\appengine-java-sdk-1.3.4, i have following folders bin config demos docs lib src and few files On Wed, May 19, 2010 at 10:05 PM, Patrick Brown patrickcbr...@gmail.comwrote: Hi I saw this problem when I installed, the sdk was actually in a sub folder of appengine-java-sdk-1.3.4, after moving it out it worked well. Is this your issue also? Thanks, Patrick On Wed, May 19, 2010 at 4:38 PM, Ravi Sharma ping2r...@gmail.com wrote: I Downloaded the SDK and tried to create SDK 1.3.4 in eclipse. The Zip file was unzipped as D:\library\appengine-java-sdk-1.3.4, so while adding SDK in eclipse i choose this as Installation dir. But after choosing it says failed to initialize App ENgine SDK at D:\library\appengine-java-sdk-1.3.4. Am i doing something wrong here?. When this version will be available through eclipse site directly? Thanks, Ravi On Wed, May 19, 2010 at 6:30 PM, Ikai L (Google) ika...@google.comwrote: Hello, App Engine developers! Hopefully you're all following along the Google I/O keynote and seen our blog posts with new App Engine annoucements. Well, we've got another exciting announcement: SDK 1.3.4 is LIVE! Get it below: http://code.google.com/appengine/downloads.html Release notes are below: Java --- Version 1.3.4 = - Client side bulkloader available with the Python SDK that has a new configuration syntax and wizard for easier import/export with the datastore. Can be used by enabling remote_api in your Java application - Applications can now be configured to authenticate with OpenID by selecting the OpenID option when creating your application in the admin console http://code.google.com/p/googleappengine/issues/detail?id=248 http://code.google.com/p/googleappengine/issues/detail?id=56 - New API to allow App Engine apps to act as OAuth service providers http://code.google.com/p/googleappengine/issues/detail?id=919 - The version update check in the Java SDK now uses https - Allow full access to javax.el.* http://code.google.com/p/googleappengine/issues/detail?id=3157 - Increased the timeout during deployment to 15 minutes - Fixed an issue with JPA where an illegal cast exception was thrown during the fetch of integer fields - MemcacheService.setNamespace() is deprecated in favor of MemcacheServiceFactory.getMemcacheManager(namespace) - Support in the SDK for Java 1.5 is being deprecated. These warnings now appear when starting the SDK -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine ppengine target=_blankhttp://www.reddit.com/r/appengine -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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] Facebook/social website design problem
Hi, I am trying to design a website like Facebook, where user will have friends and will have wall where they can see there friend's updates etc. While designing it on GAE i got confused with what will be the best approach like data duplicate, data read time or data write time etc Friend's Design: I thought there will be User and User will be friend with another User. Class User{ Key id; String name; String email; ...etc } Now i definitely can not have owened relatioship with Friends means I can not have ListUser friends in my User Class as it will not be same domain(User) data, so i thought ok i will have ListKey or ListLong User Ids as Friends Class User{ Key id; String name; String email; Listkey friends. ...etc } And confusion/problem begins. First a Friendship is supposed to be from both side, so it should be defined only once but in this design both Friends will have each other's id in there friend list. Basically its not a typical relationship. What if i want to keep friendship info like when it started, who introduced etc. Then i may need to create a new Friend class with two fields as user1Id and user2Id and query this class with user1Id=userId or user2Id=userId. But not sure about this approach. Second i am doing data duplicate(but i am fine with it if it can be proved as best solution). Third: I am showing one user's profile and want to show his friends on one page, so first i need to get the User and its Friend ListKey then i need to search User for each and every Id to get each user's data(like name.profile id and photo). For me it seemed bit longer process.Not sure how queries will perform. Pseudo Code will be like this Get Logged In User Loop through friends field Begin get User for each iterated Friend Id. //and if we want to show how many friends that user have, then i will be accessing friend list for each friend,so there will be lot of data read from database. End put all data in jsp to compile and show it to user. Other design problem related to wall like Facebook wall/profile, Lets say i have UserActivity class to keep track of User's Activity and that can be owned by User, so User class can look like Class User { Key id; String name; String email; ListKey friends//assume we are going with this kind of design ListUserActivity activities } Class UserActivity { Key id; String statusMessage; Date time; User user; } Now i want to show all activities of a user to him/her order by time(recent first/on the top). Now again i see one way of doing it as get all the Friend's id from ListKey friends field, query all User data then go through UserActivity and get all data in memory and sort it out. This seems not a good option to me. How can i solve this problem efficiently and design a good solution. Thanks in advance Ravi. -- 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: Facebook/social website design problem
Thanks Li for looking into it. For me 1-2 minute delay is fine, problem is like contains query(for finding friend's data), i can pass max 30 user id, so basically on one page i will be able to show max 30. But in other case where wall type data need to be saved queries need to perform faster and need to break the limit of 30 as i would like to get latest activity from all of my friends rather then first 30 friends. So if i have 300 friends i may need to run such query 10 times in the batch of 30 nad each time need to go through activties and sort them out which will be very time consuming and sure user will not like the response time. I am thinking why not do it at the write time that my updates goes to all of friend's domain but again in one 30 second request i will try to create/update my domain(user Data) + 300(assuming i have 300 friends) other domains. I am not sure how it will perform. But i would love to see some solution where write is less and still read is faster like any other site(facebook/twitter etc) Ravi. On May 18, 4:31 pm, Yiming Li yiming...@umail.ucsb.edu wrote: This is an interesting problem, I am not an expert on database design, especially key-value based datastore, but I will try to answer this question. For me, the design like Class User{ Key id; String name; String email; Listkey friends. ...etc} makes perfect sense, and as you said, you can do more query on something like UserActivity or TimeBecomeFriends, with user1Id=userId or user2Id=userId. approach. I am also fine with it. How big is your application? I think a good design is relevant to the scalability, and we are always trading storage space with query time. Another thing maybe useful is memcache, using it may lead to a gain in performance, although it may bring a bit data inconsistency, however I think it's ok. For example, it should be fine if you see your friends' latest post 1 minute later. Maybe there is some paper talking about datastore design for scalable applications? Not sure. Thanks On Tue, May 18, 2010 at 7:58 AM, Ravi ping2r...@gmail.com wrote: Hi, I am trying to design a website like Facebook, where user will have friends and will have wall where they can see there friend's updates etc. While designing it on GAE i got confused with what will be the best approach like data duplicate, data read time or data write time etc Friend's Design: I thought there will be User and User will be friend with another User. Class User{ Key id; String name; String email; ...etc } Now i definitely can not have owened relatioship with Friends means I can not have ListUser friends in my User Class as it will not be same domain(User) data, so i thought ok i will have ListKey or ListLong User Ids as Friends Class User{ Key id; String name; String email; Listkey friends. ...etc } And confusion/problem begins. First a Friendship is supposed to be from both side, so it should be defined only once but in this design both Friends will have each other's id in there friend list. Basically its not a typical relationship. What if i want to keep friendship info like when it started, who introduced etc. Then i may need to create a new Friend class with two fields as user1Id and user2Id and query this class with user1Id=userId or user2Id=userId. But not sure about this approach. Second i am doing data duplicate(but i am fine with it if it can be proved as best solution). Third: I am showing one user's profile and want to show his friends on one page, so first i need to get the User and its Friend ListKey then i need to search User for each and every Id to get each user's data(like name.profile id and photo). For me it seemed bit longer process.Not sure how queries will perform. Pseudo Code will be like this Get Logged In User Loop through friends field Begin get User for each iterated Friend Id. //and if we want to show how many friends that user have, then i will be accessing friend list for each friend,so there will be lot of data read from database. End put all data in jsp to compile and show it to user. Other design problem related to wall like Facebook wall/profile, Lets say i have UserActivity class to keep track of User's Activity and that can be owned by User, so User class can look like Class User { Key id; String name; String email; ListKey friends//assume we are going with this kind of design ListUserActivity activities } Class UserActivity { Key id; String statusMessage; Date time; User user; } Now i want to show all activities of a user to him/her order by time(recent first/on the top). Now again i see one way of doing it as get all the Friend's id from ListKey friends field, query all User data then go through UserActivity and get all data in memory and sort it out. This seems not a good option to me
Re: [appengine-java] Re: is createFederatedLoginURL() working?
Drasko, I checked your demo,its great. I found one small problem. For Yahoo and google it works fine but for AOL and OpenId it go to goole login page. does this mean we can use only google and yahoo or its something you have just not provided correct info while creating the urls. Thyanks, Ravi. 2010/5/18 Drasko drasko.ko...@googlemail.com As of 1.3.4 the method createFederatedLoginURL is being merged into the standard createLoginURL method. Same happend to other federated methods. UserService userService = UserServiceFactory.getUserService(); to get the authenticated user: User user = userService.getCurrentUser(); to get the logout redirect URL: String redirectURLbyFederation = userService.createLogoutURL(destinationURL, authDomain); to get the login redirect URL: String redirectURLbyFederation = userService.createLoginURL(destinationURL, authDomain, federatedIdentity, attributesRequest); I have successfully used the following request attributes: SetString attributesRequest = new HashSetString(); attributesRequest.add(openid.mode=checkid_immediate); attributesRequest.add(openid.ns=http://specs.openid.net/auth/ 2.0); attributesRequest.add(openid.return_to=http://super- easy.appspot.com); A working example with the GWT widget to select an OpenID provider is running under the http://super-easy.appspot.com HTH Drasko On May 13, 1:39 am, Robert Lancer robert.lan...@gmail.com wrote: Me too, some documentation would be helpful. On May 12, 4:54 am, antichrist ttlt...@gmail.com wrote: I also trying to use this. In my case, I want to log in via my apps domain id (ex: exampl...@example.com), So HashSetString attributes = new HashSet(); attributes.add(openid.mode=checkid_immediate); attributes.add(openid.ns= http://specs.openid.net/auth/2.0;); attributes.add(openid.return_to= http://example.com;); userService.createFederatedLoginURL(example.com , requestUri, example.com, attributes)); And From this, created link is : http://example.com/_ah/login_redir?claimid=example.comcontinue=http:... When I clicked that link, it redirect to my apps domain login page, but after login complete it redirect to example.com but page not found error occured. I changed above link with modification and find claimid=example.com part is correct but continue=http://example.com/isincorrect. But I can't figure out correct input. On 4월7일, 오전3시56분, Viðar Svansson vidarsv...@gmail.com wrote: Hi I just noticedcreateFederatedLoginURL() but could not find any documentation for it (except for JavaDoc). Is this intended for native support for Google Marketplace? Would really appreciate some documentation on this. I am trying this out in 1.3.2 but get an error, The API package 'user' or call 'CreateFederatedLoginURL()' was not found. Viðar On Sat, Mar 27, 2010 at 10:27 AM, dflorey daniel.flo...@gmail.com wrote: Hi, I'm trying to replace the Step2 stuff with the new createFederatedLoginURL(), but I just get server errors in the provided /_ah/ servlets. Are these methods supposed to work and can someone please post an example how to authenticate and authorize a user? Thanks a lot, Daniel -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en.-원본http://groups.google.com/group/google-appengine-java?hl=en.-%EC%9B%90%EB%B3%B8텍스트 숨기기 - - 원본 텍스트 보기 - -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine
Re: [appengine-java] Re: Prerelease 1.3.4 SDK ready for download
I tried using it in dev mode in my machine and used the following method to create login URL. UserServiceFactory.getUserService().createLoginURL(/index.htm, www.test.com,emai...@hotmail.com, null); and i got the login url as http://127.0.0.1:/_ah/login?continue=%2Findex.htm and i am guessing that even for open id logins in dev mode GAE will present the same old login screen. So i tried deploying it on prod but i guess curretnly i cant run it. as got the exception java.lang.NoSuchMethodError: com.google.appengine.api.users.UserService.createLoginURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;)Ljava/lang/String; So just waiting when it will be released on app engine as there is nothing different on dev server to test..earlier also we could use any login is like a...@example.com and now too. But i want to check it on app engine when it will start sending me on yahoo site or hotmail or any other provider. But thanks google and waiting for it to go in production. Tavi. On Fri, May 14, 2010 at 5:20 AM, Robert Lancer robert.lan...@gmail.comwrote: Yeah, whats with the with OpenID by selecting the OpenID option when creating your application, I hope this doesn't means that all our existing apps will be locked out. On May 13, 2:17 pm, atomi at...@verizon.net wrote: Are there API reference docs for the OpenID support? It seems as though a new application would need to be created for this to work - am I correct in assuming this? As of now I don't see that option, which makes it a little difficult to test or play with. What is the ETA/schedule on the feature complete 1.3.4 release? Thanks. On Thu, May 13, 2010 at 10:48 AM, Ikai L (Google) ika...@google.com wrote: ... a link to the download would be helpful: http://code.google.com/p/googleappengine/downloads/list On Thu, May 13, 2010 at 7:45 PM, Ikai L (Google) ika...@google.com wrote: Greetings, Java developers! Prerelease SDK 1.3.4 is ready for download. As usual, please help us test this release and post feedback to this thread. The release notes are below: Version 1.3.4 = - Client side bulkloader available with the Python SDK that has a new configuration syntax and wizard for easier import/export with the datastore. Can be used by enabling remote_api in your Java application - Applications can now be configured to authenticate with OpenID by selecting the OpenID option when creating your application in the admin console http://code.google.com/p/googleappengine/issues/detail?id=248 http://code.google.com/p/googleappengine/issues/detail?id=56 - New API to allow App Engine apps to act as OAuth service providers http://code.google.com/p/googleappengine/issues/detail?id=919 - The version update check in the Java SDK now uses https - Allow full access to javax.el.* http://code.google.com/p/googleappengine/issues/detail?id=3157 - Increased the timeout during deployment to 15 minutes - Fixed an issue with JPA where an illegal cast exception was thrown during the fetch of integer fields - MemcacheService.setNamespace() is deprecated in favor of MemcacheServiceFactory.getMemcacheManager(namespace) - Support in the SDK for Java 1.5 is being deprecated. These warnings now appear when starting the SDK -- Ikai Lan Developer Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- Ikai Lan Developer Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp://
[appengine-java] Domain Setup
Hi, I have a application running on Google app engine and lets say i am accessing it through www.mysite.com (Mysite.com is registered on google apps) Now i have created another application which i want to access through newapp.mysite.com (through sub domain of above application). Is it possible? If yes then how. I tried to do following step but no success. mysite.com is already added to application-1(my main application to my domain) So now i tried to add newapp.mysite.com to application-2 under application setting of application-2, but it says Sorry, you've reached a login page for a domain that isn't using Google Apps. Please check the web address and try again. (although mysite.com do use google apps) Any idea? Ravi. -- 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] Not allowed to access system class loader.
A simple servlet which reads some data from a table - and query analytics service and store data in another table. When i run this servlet from browser it works (always). I have scheduled this servlet to run as cron job and it is not working at all. And i see the below exception in App engine logs. 01-26 04:36PM 45.184 com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue $SystemLoader loadFinalizer: Not allowed to access system class loader. I 01-26 04:36PM 45.197 com.google.appengine.repackaged.com.google.common.base.internal.Finalizer getInheritableThreadLocalsField: Couldn't access Thread.inheritableThreadLocals. Reference finalizer threads will inherit thread local values. I 01-26 04:36PM 45.201 com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue init: Failed to start reference finalizer thread. Reference cleanup will only occur when new references are created. java.lang.reflect.InvocationTargetException at com.google.appengine.runtime.Request.process-51100059fa394f2b (Request.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Method.java:42) at com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.init (FinalizableReferenceQueue.java:124) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools $WeakInterningPool.clinit(InterningPools.java:104) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool (InterningPools.java:48) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.clinit (ProtocolSupport.java:55) at com.google.apphosting.api.DatastorePb$Query.init (DatastorePb.java:1072) at com.google.apphosting.api.DatastorePb$Query$1.init (DatastorePb.java:2529) at com.google.apphosting.api.DatastorePb$Query.clinit (DatastorePb.java:2529) at com.google.appengine.api.datastore.QueryTranslator.convertToPb (QueryTranslator.java:28) at com.google.appengine.api.datastore.DatastoreServiceImpl $PreparedQueryImpl.convertToPb(DatastoreServiceImpl.java:424) at com.google.appengine.api.datastore.DatastoreServiceImpl $PreparedQueryImpl.runQuery(DatastoreServiceImpl.java:384) at com.google.appengine.api.datastore.DatastoreServiceImpl $PreparedQueryImpl.asQueryResultIterator(DatastoreServiceImpl.java: 358) at com.google.appengine.api.datastore.DatastoreServiceImpl $PreparedQueryImpl$2.iterator(DatastoreServiceImpl.java:338) at com.google.appengine.api.datastore.DatastoreServiceImpl $PreparedQueryImpl$2.iterator(DatastoreServiceImpl.java:336) at org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterable.iterator (RuntimeExceptionWrappingIterable.java:42) at org.datanucleus.store.appengine.query.LazyResult.init (LazyResult.java:67) at org.datanucleus.store.appengine.query.StreamingQueryResult.init (StreamingQueryResult.java:63) at org.datanucleus.store.appengine.query.DatastoreQuery.newStreamingQueryResultForEntities (DatastoreQuery.java:399) at org.datanucleus.store.appengine.query.DatastoreQuery.wrapEntityQueryResult (DatastoreQuery.java:372) at org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery (DatastoreQuery.java:364) at org.datanucleus.store.appengine.query.DatastoreQuery.executeQuery (DatastoreQuery.java:265) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute (DatastoreQuery.java:228) at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute (JDOQLQuery.java:85) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithArray(Query.java: 1371) at org.datanucleus.store.query.Query.execute(Query.java:1344) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221) at sample.data.SaveGoogleData.saveData(SaveGoogleData.java:53) at sample.controller.DataStoreServlet.doGet(DataStoreServlet.java:21) 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
Re: [appengine-java] Critical issue with INDEX
Thanks Ikai. On Wed, Dec 9, 2009 at 6:30 PM, Ikai L (Google) ika...@google.com wrote: Here's the issue in our public tracker: http://code.google.com/p/googleappengine/issues/detail?id=2481 On Wed, Dec 9, 2009 at 9:56 AM, Ikai L (Google) ika...@google.com wrote: Ravi, We're aware of the issue and have already begun investigating it. I'll open up a public issue to mirror our progress so everyone can follow it and add their comments. On Wed, Dec 9, 2009 at 1:09 AM, Ravi Sharma ping2r...@gmail.com wrote: Can anyone from google look into this issue please? On Mon, Dec 7, 2009 at 8:15 PM, Ravi Sharma ping2r...@gmail.com wrote: Hi Jason and all Google guys, This is real big problem and its not just canslimbot application but there are many applications, in today's mails i can see 3 people have faced this problem i ncluding m e. I am sure there is some defect in index building. Can you please have a look. Thanks, Ravi. On Mon, Dec 7, 2009 at 3:40 PM, GTZhou sharkillf...@gmail.com wrote: Jason: I need your help. Before I create the index,My app works fine,and I use the query below,I can get 1 row. SELECT FROM StockBase where code = '600175' and season = '3' and year = '2009' However,after create the index,and status of index is serving.I use the query above,then can not get anything.But I sure the data stored on the server.Because when I remove the and year = '2009'.I can also get the rows. My application id is canslimbot. Pls tell me the reason about it,thank u! -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine -- Ikai Lan Developer Programs Engineer, Google App Engine -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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.
Re: [appengine-java] Re: XMPP Message not being received
Hi Googlers and GAE users, I changed code little bit, there was one problem.And then i tried sedning a message every 2 seconds and it went fine. I think after this fix i will be able to get a speed of 80 messages/second, but still far away from 3000/second. i removed this line * Chat chat = connection.getChatManager().createChat( ap...@appspot.com, messgageHandler); *from function sendToGae and then i could send messages faster. Now Chat chat is my class variable and get created once in constructor . And after 1 message per 2 seconds i got curious and just ran the loop to send many messages with out any delay and after sending 92 messages continuosly i got Constraint response.It didnt say much about what constraint but i could send 90 messages in a row without delay.* * public void sendToGae(String message) throws XMPPException, MessageException { * Chat chat = connection.getChatManager().createChat( ap...@appspot.com, messgageHandler);*//this line i removed //messageHandler will receive the message back from server, if i receive the same mesage back that means my message did not reach server.If i receive success, that means my message reached chat.sendMessage(messageXml); } public void disconnect() throws XMPPException { connection.disconnect(); }} On Tue, Dec 1, 2009 at 11:24 PM, Ravi Sharma ping2r...@gmail.com wrote: Hi Ikai, Yes you are right you might have got 10 messages/minute. As i said i also got 12 messages/min once( 1 messages every 5 seconds), but this not what i was expecting. Iwas expecting around 3000 messages/min. I had to send around 5 messages and it completed yesterday. And first time i started sending messages on 24 Nov. so total 7 nights. But i think for 5 messages i should have spent around 5/3000 = 17 minutes provided i stil have quota for the day. Lets says things are bit slower with GAE, so i can expect 1 hours. I am sure there is something missing somewhere. Does gtalk.google.com(XMPP server) has any limitation?. or any other problem. Can you please try to send like 1000 mesasges in a minute and let us know the result. And in my previous mail i forgot to add the response. The response i was getting for those messages was Service-unavailable . Error code 503. Thanks, Ravi. On Tue, Dec 1, 2009 at 10:05 PM, Ikai L (Google) ika...@google.comwrote: Ravi, Using the sample code, I am able to get above 10 messages a minute. What happens when you add your application in GTalk instead of your custom client? Here's the code I'm using. It's basically an XMPP echo server: import java.io.IOException; import javax.servlet.http.*; import com.google.appengine.api.xmpp.*; @SuppressWarnings(serial) public class XMPPReceiverServlet extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { XMPPService xmpp = XMPPServiceFactory.getXMPPService(); Message message = xmpp.parseMessage(req); JID fromJid = message.getFromJid(); String body = message.getBody(); String msgBody = Received message: + body; Message msg = new MessageBuilder() .withRecipientJids(fromJid) .withBody(msgBody) .build(); boolean messageSent = false; if (xmpp.getPresence(fromJid).isAvailable()) { SendResponse status = xmpp.sendMessage(msg); messageSent = (status.getStatusMap().get(fromJid) == SendResponse.Status.SUCCESS); } if (!messageSent) { // Do something, log an error } } On Tue, Dec 1, 2009 at 7:35 AM, Ravi ping2r...@gmail.com wrote: Hi Ikai L/Google App Team, Did you get a chance to look at this problem? Thanks, Ravi On Nov 30, 8:19 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi, Thanks for looking into it.I am sending the small code which i am using. I am using smack library. This behaviour is not consistant. Once i was able to send messges at every 5 seconds(and sent around 4000) and once i had to make it 15 seconds for each message. i use the following class as GaeClientMessanger m = new GaeClientMessanger(); m.initConnection(); for(some loop condiiton) { .. m.sendToGae(message);} m.disconnect(); public class GaeClientMessanger{ private ConnectionConfiguration config; private XMPPConnection connection; private static LocalDefaultMessageController messgageHandler; protected Logger logger = Logger.getLogger(this.getClass()); public void initConnection() throws XMPPException { config = new ConnectionConfiguration(talk.google.com, 5222, gmail.com); connection = new XMPPConnection(config); connection.connect(); connection.login(gmailu...@gmail.com
Re: [appengine-java] Critical issue with INDEX
Hi Jason and all Google guys, This is real big problem and its not just canslimbot application but there are many applications, in today's mails i can see 3 people have faced this problem i ncluding m e. I am sure there is some defect in index building. Can you please have a look. Thanks, Ravi. On Mon, Dec 7, 2009 at 3:40 PM, GTZhou sharkillf...@gmail.com wrote: Jason: I need your help. Before I create the index,My app works fine,and I use the query below,I can get 1 row. SELECT FROM StockBase where code = '600175' and season = '3' and year = '2009' However,after create the index,and status of index is serving.I use the query above,then can not get anything.But I sure the data stored on the server.Because when I remove the and year = '2009'.I can also get the rows. My application id is canslimbot. Pls tell me the reason about it,thank u! -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are 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] Indexing Problem(always return incorrect number of rows)
Hi, After indexing my all queries returning fewer rows. I have this class public class AudioMedia{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private String title; . @Persistent private String audioTitleExternalId; } initially i was retruning a list of AudioMedia where audioTitleExternalId='SomeId' and order by id,and this query was returning correct result But then i thought its better to sort it out by title. SO i created following index datastore-index kind=AudioMedia ancestor=false source=auto property name=audioTitleExternalId direction=asc/ property name=title direction=asc/ /datastore-index and now i am returning a list of AudioMedia where audioTitleExternalId='SomeId' and order by title The only change in code i did was replacing id with title and creating indexes. Then i waited for half an hour and indexes were created for 5+ rows. But now for any audioTitleExternalId i am getting incorrect number of AudioMedia rows . for example SELECT * FROM AudioMedia where audioTitleExternalId='7475' when i run this query in Data Viewer, it returns me 6 rows with title and audioTitleExternalId for each row as not null. But through the java code it returns me only 4 rows. Somehow indexing has made my data lost somewhere or unreachable. Can you please advise what is the problem here. *Fields audioTitleExternalId and title both are not null in all entities.* Thanks, Ravi. -- 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: XMPP Message not being received
Hi Ikai L/Google App Team, Did you get a chance to look at this problem? Thanks, Ravi On Nov 30, 8:19 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi, Thanks for looking into it.I am sending the small code which i am using. I am using smack library. This behaviour is not consistant. Once i was able to send messges at every 5 seconds(and sent around 4000) and once i had to make it 15 seconds for each message. i use the following class as GaeClientMessanger m = new GaeClientMessanger(); m.initConnection(); for(some loop condiiton) { .. m.sendToGae(message);} m.disconnect(); public class GaeClientMessanger{ private ConnectionConfiguration config; private XMPPConnection connection; private static LocalDefaultMessageController messgageHandler; protected Logger logger = Logger.getLogger(this.getClass()); public void initConnection() throws XMPPException { config = new ConnectionConfiguration(talk.google.com, 5222, gmail.com); connection = new XMPPConnection(config); connection.connect(); connection.login(gmailu...@gmail.com, password); Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.accept_all); CollectionRosterEntry entries = roster.getEntries(); } public void sendToGae(String message) throws XMPPException, MessageException { Chat chat = connection.getChatManager().createChat( ap...@appspot.com, messgageHandler); //messageHandler will receive the message back from server, if i receive the same mesage back that means my message did not reach server.If i receive success, that means my message reached chat.sendMessage(messageXml); } public void disconnect() throws XMPPException { connection.disconnect(); }} On Mon, Nov 30, 2009 at 8:00 PM, Ikai L (Google) ika...@google.com wrote: Ravi, Do you have any sample code? I'd like to take a look at this. On Fri, Nov 27, 2009 at 2:43 AM, Ravi ping2r...@gmail.com wrote: Hi Googlers, Did you get a chance to look at my problem Quota page says 3000 calls/min can be handled by App Engine. But when I send a message every 5 second from a client(outside app engine), it stop responding after 10 messages. I increased the time one second each time and now for 10 seconds difference between each call is working fine. That is really really a big problem. I need to make almost 2 calls now and then may be more, so to do that I might need 2/6 = minutes(6 calls per minutes) or 55 hours or two and half day. Am I suppose to keep running my program for 2 and half days to make those 2 calls. I really need some help here. Thanks in Advance Ravi. On Nov 25, 9:50 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi Googlers, Can i have some reply on my problem, its really a stopper for our application. *Now one bigger problem we are seeing.* I send 25(testing with 25 just a number) XMPP message to GAE Application from my desktop XMPP client First 10 messages goes and delivered to GAE Application and GAE application reply it by saying Mesage delivered. but 11th and onwards message never reach to GAE application(i can see it in my logs, that my XMPP controller never received the messgae), and but my client do get a reply from GAE(my application i...@appspot.com) which is same message as what i sent. This is really weird and big problem. Why my messages are being returned back to me?. Usally in chat client it happens when someone is offline. So does it mean that my GAE chat bot has gone offline? or too busy to respond? or any other problem? And i ran this test now almost 7-8 times and everytime only first 10 messages are getting delivered. Then i thought may be its the number of request per seconds, so i started sending one message per 5 seconds but still no success.Still only 10 messages reaching GAE. Can any one from google check this problem and give some guidence what is wrong here Thanks in advance, Ravi. On Wed, Nov 25, 2009 at 9:33 AM, Ravi Sharma ping2r...@gmail.com wrote: Hi, I am trying to write a XMPP Client. When i send a mesage from Client to GAE application, it always reach the server and then server reply back. When i ran the client first time it worked for 3-4 times. but then now i am not receiving any message on client side. I checked the server logs and it says that Message sent succesfully. I am using my gmail id on client side to connect to talk.google.comserver.And i logged out my self from all google client like gmail, gtalk etc, as i was thinking may be message is being sent to another client. Intrestingky when i am logged in to Gtalk at the time when i am running my client, Gtalk recive
Re: [appengine-java] Re: XMPP Message not being received
Hi Ikai, Yes you are right you might have got 10 messages/minute. As i said i also got 12 messages/min once( 1 messages every 5 seconds), but this not what i was expecting. Iwas expecting around 3000 messages/min. I had to send around 5 messages and it completed yesterday. And first time i started sending messages on 24 Nov. so total 7 nights. But i think for 5 messages i should have spent around 5/3000 = 17 minutes provided i stil have quota for the day. Lets says things are bit slower with GAE, so i can expect 1 hours. I am sure there is something missing somewhere. Does gtalk.google.com(XMPP server) has any limitation?. or any other problem. Can you please try to send like 1000 mesasges in a minute and let us know the result. And in my previous mail i forgot to add the response. The response i was getting for those messages was Service-unavailable . Error code 503. Thanks, Ravi. On Tue, Dec 1, 2009 at 10:05 PM, Ikai L (Google) ika...@google.com wrote: Ravi, Using the sample code, I am able to get above 10 messages a minute. What happens when you add your application in GTalk instead of your custom client? Here's the code I'm using. It's basically an XMPP echo server: import java.io.IOException; import javax.servlet.http.*; import com.google.appengine.api.xmpp.*; @SuppressWarnings(serial) public class XMPPReceiverServlet extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { XMPPService xmpp = XMPPServiceFactory.getXMPPService(); Message message = xmpp.parseMessage(req); JID fromJid = message.getFromJid(); String body = message.getBody(); String msgBody = Received message: + body; Message msg = new MessageBuilder() .withRecipientJids(fromJid) .withBody(msgBody) .build(); boolean messageSent = false; if (xmpp.getPresence(fromJid).isAvailable()) { SendResponse status = xmpp.sendMessage(msg); messageSent = (status.getStatusMap().get(fromJid) == SendResponse.Status.SUCCESS); } if (!messageSent) { // Do something, log an error } } On Tue, Dec 1, 2009 at 7:35 AM, Ravi ping2r...@gmail.com wrote: Hi Ikai L/Google App Team, Did you get a chance to look at this problem? Thanks, Ravi On Nov 30, 8:19 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi, Thanks for looking into it.I am sending the small code which i am using. I am using smack library. This behaviour is not consistant. Once i was able to send messges at every 5 seconds(and sent around 4000) and once i had to make it 15 seconds for each message. i use the following class as GaeClientMessanger m = new GaeClientMessanger(); m.initConnection(); for(some loop condiiton) { .. m.sendToGae(message);} m.disconnect(); public class GaeClientMessanger{ private ConnectionConfiguration config; private XMPPConnection connection; private static LocalDefaultMessageController messgageHandler; protected Logger logger = Logger.getLogger(this.getClass()); public void initConnection() throws XMPPException { config = new ConnectionConfiguration(talk.google.com, 5222, gmail.com); connection = new XMPPConnection(config); connection.connect(); connection.login(gmailu...@gmail.com, password); Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.accept_all); CollectionRosterEntry entries = roster.getEntries(); } public void sendToGae(String message) throws XMPPException, MessageException { Chat chat = connection.getChatManager().createChat( ap...@appspot.com, messgageHandler); //messageHandler will receive the message back from server, if i receive the same mesage back that means my message did not reach server.If i receive success, that means my message reached chat.sendMessage(messageXml); } public void disconnect() throws XMPPException { connection.disconnect(); }} On Mon, Nov 30, 2009 at 8:00 PM, Ikai L (Google) ika...@google.com wrote: Ravi, Do you have any sample code? I'd like to take a look at this. On Fri, Nov 27, 2009 at 2:43 AM, Ravi ping2r...@gmail.com wrote: Hi Googlers, Did you get a chance to look at my problem Quota page says 3000 calls/min can be handled by App Engine. But when I send a message every 5 second from a client(outside app engine), it stop responding after 10 messages. I increased the time one second each time and now for 10 seconds difference between each call is working fine. That is really really a big problem. I need to make almost 2 calls now and then may
Re: [appengine-java] Re: XMPP Message not being received
Hi, Thanks for looking into it.I am sending the small code which i am using. I am using smack library. This behaviour is not consistant. Once i was able to send messges at every 5 seconds(and sent around 4000) and once i had to make it 15 seconds for each message. i use the following class as GaeClientMessanger m = new GaeClientMessanger(); m.initConnection(); for(some loop condiiton) { .. m.sendToGae(message); } m.disconnect(); public class GaeClientMessanger{ private ConnectionConfiguration config; private XMPPConnection connection; private static LocalDefaultMessageController messgageHandler; protected Logger logger = Logger.getLogger(this.getClass()); public void initConnection() throws XMPPException { config = new ConnectionConfiguration(talk.google.com, 5222, gmail.com); connection = new XMPPConnection(config); connection.connect(); connection.login(gmailu...@gmail.com, password); Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.accept_all); CollectionRosterEntry entries = roster.getEntries(); } public void sendToGae(String message) throws XMPPException, MessageException { Chat chat = connection.getChatManager().createChat( ap...@appspot.com, messgageHandler); //messageHandler will receive the message back from server, if i receive the same mesage back that means my message did not reach server.If i receive success, that means my message reached chat.sendMessage(messageXml); } public void disconnect() throws XMPPException { connection.disconnect(); } } On Mon, Nov 30, 2009 at 8:00 PM, Ikai L (Google) ika...@google.com wrote: Ravi, Do you have any sample code? I'd like to take a look at this. On Fri, Nov 27, 2009 at 2:43 AM, Ravi ping2r...@gmail.com wrote: Hi Googlers, Did you get a chance to look at my problem Quota page says 3000 calls/min can be handled by App Engine. But when I send a message every 5 second from a client(outside app engine), it stop responding after 10 messages. I increased the time one second each time and now for 10 seconds difference between each call is working fine. That is really really a big problem. I need to make almost 2 calls now and then may be more, so to do that I might need 2/6 = minutes(6 calls per minutes) or 55 hours or two and half day. Am I suppose to keep running my program for 2 and half days to make those 2 calls. I really need some help here. Thanks in Advance Ravi. On Nov 25, 9:50 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi Googlers, Can i have some reply on my problem, its really a stopper for our application. *Now one bigger problem we are seeing.* I send 25(testing with 25 just a number) XMPP message to GAE Application from my desktop XMPP client First 10 messages goes and delivered to GAE Application and GAE application reply it by saying Mesage delivered. but 11th and onwards message never reach to GAE application(i can see it in my logs, that my XMPP controller never received the messgae), and but my client do get a reply from GAE(my application i...@appspot.com) which is same message as what i sent. This is really weird and big problem. Why my messages are being returned back to me?. Usally in chat client it happens when someone is offline. So does it mean that my GAE chat bot has gone offline? or too busy to respond? or any other problem? And i ran this test now almost 7-8 times and everytime only first 10 messages are getting delivered. Then i thought may be its the number of request per seconds, so i started sending one message per 5 seconds but still no success.Still only 10 messages reaching GAE. Can any one from google check this problem and give some guidence what is wrong here Thanks in advance, Ravi. On Wed, Nov 25, 2009 at 9:33 AM, Ravi Sharma ping2r...@gmail.com wrote: Hi, I am trying to write a XMPP Client. When i send a mesage from Client to GAE application, it always reach the server and then server reply back. When i ran the client first time it worked for 3-4 times. but then now i am not receiving any message on client side. I checked the server logs and it says that Message sent succesfully. I am using my gmail id on client side to connect to talk.google.comserver.And i logged out my self from all google client like gmail, gtalk etc, as i was thinking may be message is being sent to another client. Intrestingky when i am logged in to Gtalk at the time when i am running my client, Gtalk recive the response from server. I am using smack libraries forXMPP client. 1) Can you please suggest what can be a problem here. 2) Is XMPP communication is 100% delivery system. Is there chance that my message will get lost once
Re: [appengine-java] problem in XMPP sendMessage()
I am not sure, but i think you dont need to(should not) set fromJid, as message will be sent from your application JID. I am running following code and its working . JID jid = new JID(responseJid); Message msg = new MessageBuilder() .withRecipientJids(jid) .withBody(msgBody) .build(); boolean messageSent = false; XMPPService xmpp = XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(jid).isAvailable()) { SendResponse status = xmpp.sendMessage(msg); messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS); } On Sat, Nov 28, 2009 at 2:51 PM, sahil mahajan sahilm2...@gmail.com wrote: I am using XMPP and getting following error when I try /CODE*/ Message msg = new MessageBuilder() .withRecipientJids(receiverJid) .withFromJid(new JID(recipientJid[0].getId()) ) .withMessageType(MessageType.NORMAL) .withBody(msgBody) .build(); SendResponse status =xmpp.sendMessage(msg); My JID's are correct. msgBody is not null Problem occures at xmpp.sendMessage(msg); I don't understand what is null? /***ERROR DETAILS/ Uncaught exception from servlet java.lang.NullPointerException at com.google.appengine.api.xmpp.XMPPServiceImpl.createMessageRequest(XMPPServiceImpl.java:120) at com.google.appengine.api.xmpp.XMPPServiceImpl.sendMessage(XMPPServiceImpl.java:105) at com.ChatRoom.server.XMPPReceiverServlet.doPost(XMPPReceiverServlet.java:165) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 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.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:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:239) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5135) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5133) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:814) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516) at com.google.net.rpc.impl.Server.startRpc(Server.java:769) at com.google.net.rpc.impl.Server.processRequest(Server.java:351) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:437) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:436) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:762) at
[appengine-java] Re: XMPP Message not being received
Hi Googlers, Did you get a chance to look at my problem Quota page says 3000 calls/min can be handled by App Engine. But when I send a message every 5 second from a client(outside app engine), it stop responding after 10 messages. I increased the time one second each time and now for 10 seconds difference between each call is working fine. That is really really a big problem. I need to make almost 2 calls now and then may be more, so to do that I might need 2/6 = minutes(6 calls per minutes) or 55 hours or two and half day. Am I suppose to keep running my program for 2 and half days to make those 2 calls. I really need some help here. Thanks in Advance Ravi. On Nov 25, 9:50 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi Googlers, Can i have some reply on my problem, its really a stopper for our application. *Now one bigger problem we are seeing.* I send 25(testing with 25 just a number) XMPP message to GAE Application from my desktop XMPP client First 10 messages goes and delivered to GAE Application and GAE application reply it by saying Mesage delivered. but 11th and onwards message never reach to GAE application(i can see it in my logs, that my XMPP controller never received the messgae), and but my client do get a reply from GAE(my application i...@appspot.com) which is same message as what i sent. This is really weird and big problem. Why my messages are being returned back to me?. Usally in chat client it happens when someone is offline. So does it mean that my GAE chat bot has gone offline? or too busy to respond? or any other problem? And i ran this test now almost 7-8 times and everytime only first 10 messages are getting delivered. Then i thought may be its the number of request per seconds, so i started sending one message per 5 seconds but still no success.Still only 10 messages reaching GAE. Can any one from google check this problem and give some guidence what is wrong here Thanks in advance, Ravi. On Wed, Nov 25, 2009 at 9:33 AM, Ravi Sharma ping2r...@gmail.com wrote: Hi, I am trying to write a XMPP Client. When i send a mesage from Client to GAE application, it always reach the server and then server reply back. When i ran the client first time it worked for 3-4 times. but then now i am not receiving any message on client side. I checked the server logs and it says that Message sent succesfully. I am using my gmail id on client side to connect to talk.google.comserver.And i logged out my self from all google client like gmail, gtalk etc, as i was thinking may be message is being sent to another client. Intrestingky when i am logged in to Gtalk at the time when i am running my client, Gtalk recive the response from server. I am using smack libraries forXMPP client. 1) Can you please suggest what can be a problem here. 2) Is XMPP communication is 100% delivery system. Is there chance that my message will get lost once on server or client i see that message has been sent. Thanks, Ravi. -- 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] XMPP Message not being received
Hi, I am trying to write a XMPP Client. When i send a mesage from Client to GAE application, it always reach the server and then server reply back. When i ran the client first time it worked for 3-4 times. but then now i am not receiving any message on client side. I checked the server logs and it says that Message sent succesfully. I am using my gmail id on client side to connect to talk.google.comserver.And i logged out my self from all google client like gmail, gtalk etc, as i was thinking may be message is being sent to another client. Intrestingky when i am logged in to Gtalk at the time when i am running my client, Gtalk recive the response from server. I am using smack libraries forXMPP client. 1) Can you please suggest what can be a problem here. 2) Is XMPP communication is 100% delivery system. Is there chance that my message will get lost once on server or client i see that message has been sent. Thanks, Ravi. -- 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.
Solved : Re: [appengine-java] Re: XML to Object libraries and Vice Versa
Hi Guys, I tried Betwixt from apache(http://commons.apache.org/betwixt/index.html). And it works out of box. I only got into some problems as i downloaded some older version of dependecies(Digester and beanutils). So when using Betwixt make sure you have latest version of all dependecnies. Also in local it will not ask for dependecies as GWT-window jar contains DIgester and Collection classes, but on GAE server you need it. So download those jars and keep them in your lib folder. I dont miss JAXB any more :) Thanks, Ravi. On Sun, Nov 22, 2009 at 8:13 PM, Rusty Wright rwright.li...@gmail.comwrote: Here are some bookmarks I have for xml: http://www.xom.nu/ http://www.smooks.org/mediawiki/index.php?title=Main_Page http://jibx.sourceforge.net/ http://xstream.codehaus.org/ http://castor.org/ I'll be trying castor. Ravi wrote: Hi Few days back i asked a question that which libraries can be used to Convert Object to Xml and vice versa, and got advice to use betwixt (http://commons.apache.org/betwixt/)http://commons.apache.org/betwixt/%29 .. I tried it and its working locally but on GAE server its not working and throwing following exception org.apache.commons.betwixt.XMLIntrospector introspect: Security manager does not allow bean info search path to be set then i suppose we can not use Betwixt on GAE. If we can then can anyone tell what i can do to make it work. If not then can you suggest any othe rlibarary which can be used. Thanks, Ravi. On Nov 8, 5:50 pm, LUAI KASSAR luai.kas...@gmail.com wrote: Use Apache betwixt ,its works on GAEhttp://commons.apache.org/betwixt/ On Sun, Nov 8, 2009 at 7:46 PM, Ravi Sharma ping2r...@gmail.com wrote: I am not sure if i understand you. Can you explain bit more, an example or link would be great. I can do normal Sax parsing but then writing code for each different kind of xml is gonna be very tidious work.So looking for some GAE supported libararies like JAXB or XMLBEAN My Requirment is as follows(in cae is there was any misunderstanding) xml order clientinfo name/name address/address /clientinfo items item namePersonName/neam quantity2/quantity price/price /item /items vendor nameMy Venod ltd/name addressABC 234/address /vendor /order and now in java if i want to get the vbendor name tehn i should be able to access it using classes directly(which will be generated compile time) Order order = SomeMarsheller.unmashel(fullxml); String vendorName = order.getVendor().getName(); My Orginal Mail was Hi, Is there any library like Apache XMLBeans/JAXB supported in Google APP Engine which can be used for converting XML to Java Object and Java Objects to XML. I checked the White lists of libraries and found that JAXB is not supported ( I have already stared the issue related to it) and Xmlbeans was not mentioned as Supported Library. I am sure lots of people here doing this normal thing to convert Java Object to XML and Vice Versa. Please Suggest some thing Ravi. On Fri, Nov 6, 2009 at 3:59 PM, rakeshv rak...@rakeshv.org wrote: I am sure lots of people here doing this normal thing to convert Java Object to XML and Vice Versa. Please Suggest some thing. The XML element/attribute pair maps quite well into the low level API Entity/properties structure. That should be all you need. Rakesh- Hide quoted text - - Show quoted text - -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=. -- 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: XML to Object libraries and Vice Versa
Hi Few days back i asked a question that which libraries can be used to Convert Object to Xml and vice versa, and got advice to use betwixt (http://commons.apache.org/betwixt/).. I tried it and its working locally but on GAE server its not working and throwing following exception org.apache.commons.betwixt.XMLIntrospector introspect: Security manager does not allow bean info search path to be set then i suppose we can not use Betwixt on GAE. If we can then can anyone tell what i can do to make it work. If not then can you suggest any othe rlibarary which can be used. Thanks, Ravi. On Nov 8, 5:50 pm, LUAI KASSAR luai.kas...@gmail.com wrote: Use Apache betwixt ,its works on GAEhttp://commons.apache.org/betwixt/ On Sun, Nov 8, 2009 at 7:46 PM, Ravi Sharma ping2r...@gmail.com wrote: I am not sure if i understand you. Can you explain bit more, an example or link would be great. I can do normal Sax parsing but then writing code for each different kind of xml is gonna be very tidious work.So looking for some GAE supported libararies like JAXB or XMLBEAN My Requirment is as follows(in cae is there was any misunderstanding) xml order clientinfo name/name address/address /clientinfo items item namePersonName/neam quantity2/quantity price/price /item /items vendor nameMy Venod ltd/name addressABC 234/address /vendor /order and now in java if i want to get the vbendor name tehn i should be able to access it using classes directly(which will be generated compile time) Order order = SomeMarsheller.unmashel(fullxml); String vendorName = order.getVendor().getName(); My Orginal Mail was Hi, Is there any library like Apache XMLBeans/JAXB supported in Google APP Engine which can be used for converting XML to Java Object and Java Objects to XML. I checked the White lists of libraries and found that JAXB is not supported ( I have already stared the issue related to it) and Xmlbeans was not mentioned as Supported Library. I am sure lots of people here doing this normal thing to convert Java Object to XML and Vice Versa. Please Suggest some thing Ravi. On Fri, Nov 6, 2009 at 3:59 PM, rakeshv rak...@rakeshv.org wrote: I am sure lots of people here doing this normal thing to convert Java Object to XML and Vice Versa. Please Suggest some thing. The XML element/attribute pair maps quite well into the low level API Entity/properties structure. That should be all you need. Rakesh- Hide quoted text - - Show quoted text - -- 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=.
[appengine-java] Re: XML to Object libraries and Vice Versa
I am not sure if i understand you. Can you explain bit more, an example or link would be great. I can do normal Sax parsing but then writing code for each different kind of xml is gonna be very tidious work.So looking for some GAE supported libararies like JAXB or XMLBEAN My Requirment is as follows(in cae is there was any misunderstanding) xml order clientinfo name/name address/address /clientinfo items item namePersonName/neam quantity2/quantity price/price /item /items vendor nameMy Venod ltd/name addressABC 234/address /vendor /order and now in java if i want to get the vbendor name tehn i should be able to access it using classes directly(which will be generated compile time) Order order = SomeMarsheller.unmashel(fullxml); String vendorName = order.getVendor().getName(); My Orginal Mail was Hi, Is there any library like Apache XMLBeans/JAXB supported in Google APP Engine which can be used for converting XML to Java Object and Java Objects to XML. I checked the White lists of libraries and found that JAXB is not supported ( I have already stared the issue related to it) and Xmlbeans was not mentioned as Supported Library. I am sure lots of people here doing this normal thing to convert Java Object to XML and Vice Versa. Please Suggest some thing Ravi. On Fri, Nov 6, 2009 at 3:59 PM, rakeshv rak...@rakeshv.org wrote: I am sure lots of people here doing this normal thing to convert Java Object to XML and Vice Versa. Please Suggest some thing. The XML element/attribute pair maps quite well into the low level API Entity/properties structure. That should be all you need. Rakesh --~--~-~--~~~---~--~~ 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] XMPP Message Length limit
Hi, Is is there any limit on maximum length of XMPP message.? Ravi. --~--~-~--~~~---~--~~ 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: Child key is always null
No Reply :( I am eagerly waiting for response, as if it doesnt work then i may need to redesign all m y entities for unowned relations... :( On Sep 24, 11:29 pm, Ravi Sharma ping2r...@gmail.com wrote: Hi, I have following classes. I am creating a country object first and it get persisted, then i read its key field and i get some value. Basically i start a transaction and persist it close/commit the transaction. then i create a State and set Country for state object as the country(reload the country in this transaction) i just created. After i save State object using pm.makePersistent(state); I try to read id field(Key) from state object, but its coming as null and data(state object) is not persisting. Can you please advise me if i am doing anything wrong. Following are the classes @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Country implements BaseObject{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private String name; @Persistent private long stateCount; @Persistent(mappedBy = country) private ListState states; } @PersistenceCapable(identityType = IdentityType.APPLICATION) public class State implements BaseObject{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private String name; @Persistent private Country country; @Persistent(mappedBy = state) private ListDistrict districts; } public interface BaseObject { public Key getId(); public void setId(Key id); } Thanks, Ravi --~--~-~--~~~---~--~~ 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] Child key is always null
Hi, I have following classes. I am creating a country object first and it get persisted, then i read its key field and i get some value. Basically i start a transaction and persist it close/commit the transaction. then i create a State and set Country for state object as the country(reload the country in this transaction) i just created. After i save State object using pm.makePersistent(state); I try to read id field(Key) from state object, but its coming as null and data(state object) is not persisting. Can you please advise me if i am doing anything wrong. Following are the classes @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Country implements BaseObject{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private String name; @Persistent private long stateCount; @Persistent(mappedBy = country) private ListState states; } @PersistenceCapable(identityType = IdentityType.APPLICATION) public class State implements BaseObject{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private String name; @Persistent private Country country; @Persistent(mappedBy = state) private ListDistrict districts; } public interface BaseObject { public Key getId(); public void setId(Key id); } Thanks, Ravi --~--~-~--~~~---~--~~ 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: Java Security Error
Thanks for the reply... Can u please elaborate How JDBC request can be pushed to another server I have an event coming up so I have to upload the site in urgency. any help would be appreciated. On Sep 14, 2:25 am, Gianni Mariani gian...@google.com wrote: App Engine does not allow access to JDBC. You must either use the App Engine Datastore or push you JDBC requests to another server using the UrlFetch service (perhaps using SDC). On Sun, Sep 13, 2009 at 2:14 AM, Ravi Mandliya funkyr...@gmail.com wrote: Hello everyone I just uploaded my first application, its running, and seems to be working fine, but there is a problem, I get the following error when onblur() on the textbox is activated, I have applied ajax which fetches the data from Database(IBM DB2). It generates the following error: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.io) Full error code is following: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139) at java.lang.SecurityManager.checkPackageAccess(Unknown Source) at org.apache.jasper.servlet.JasperLoader.loadClass (JasperLoader.java: 117) at org.apache.jasper.servlet.JasperLoader.loadClass (JasperLoader.java: 69) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at java.sql.DriverManager.getCallerClass(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.apache.jsp.validate_jsp._jspService(validate_jsp.java: 65) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 806) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access $101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet $2.run (PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service (PrivilegedJspServlet.java:57) 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.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) 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.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:313) 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:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java: 514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 211
[appengine-java] java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.io)
Hello everyone I just uploaded my first application, its running, and seems to be working fine, but there is a problem, I get the following error when onblur() on the textbox is activated, I have applied ajax which fetches the data from Database(IBM DB2). It generates the following error: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.io) Full error code is following: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139) at java.lang.SecurityManager.checkPackageAccess(Unknown Source) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java: 117) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java: 69) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at java.sql.DriverManager.getCallerClass(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.apache.jsp.validate_jsp._jspService(validate_jsp.java:65) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access $101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet$2.run (PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service (PrivilegedJspServlet.java:57) 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.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) 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.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:313) 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:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run (SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run (BoundedThreadPool.java:442) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en
[appengine-java] Java Security Error
Hello everyone I just uploaded my first application, its running, and seems to be working fine, but there is a problem, I get the following error when onblur() on the textbox is activated, I have applied ajax which fetches the data from Database(IBM DB2). It generates the following error: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.io) Full error code is following: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139) at java.lang.SecurityManager.checkPackageAccess(Unknown Source) at org.apache.jasper.servlet.JasperLoader.loadClass (JasperLoader.java: 117) at org.apache.jasper.servlet.JasperLoader.loadClass (JasperLoader.java: 69) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at java.sql.DriverManager.getCallerClass(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.apache.jsp.validate_jsp._jspService(validate_jsp.java: 65) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 806) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access $101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet $2.run (PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service (PrivilegedJspServlet.java:57) 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.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) 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.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:313) 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:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java: 514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 381) at org.mortbay.io.nio.SelectChannelEndPoint.run (SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run (BoundedThreadPool.java:442) Thanks in advance Regards --~--~-~--~~~---~--~~ 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
[appengine-java] Re: Right side of expression is of unexpected type: org.datanucleus.query.expression.VariableExpression - Unable to runa simple query after 1.2.2 update
no worries i got it fixedI dont know how it was working in previous version I was declaring params ina loop of Map which i pass to this function Map crit;//this is being passed to this function //i create another paramMap which will be passed to query.executeWithMap(); for(String key:crit.keySet()) { fieldName = getFieldName(key); value = crit.get(key); paramName = p_ + fieldName; paramMap.put(paramName, value); query.declareParameters(getClassType(value.getClass ().getName())+ + paramName); } above code was working..and i think it was buggy as per JDO standards as i thought one call to declareParameters set one param and if i call 2 times it will se two params..but not true, all the params need to be set at once with comma seprated, so i changed the loop like this for(String key:crit.keySet()) { fieldName = getFieldName(key); value = crit.get(key); paramName = p_ + fieldName; paramMap.put(paramName, value); System.out.println(New Declare Param = +getClassType (value.getClass().getName())+ + paramName +:+value); if(!.equals(declareParamString)) declareParamString = declareParamString + , +getClassType (value.getClass().getName())+ + paramName; else declareParamString = getClassType(value.getClass().getName())+ + paramName; } System.out.println(New Declare Param = +declareParamString); query.declareParameters(declareParamString); Ravi. On Aug 29, 12:44 am, Ravi Sharma ping2r...@gmail.com wrote: Hi, I am creating a query as follows, it was working before and then i upgraded to SDK1.2.2 and it stopped working criteria = mainPost=p_mainPost and category=p_category; query = pm.newQuery(Post.class,criteria); MapString,Object paramMap = new HashMapString,Object(); paramMap.put(p_mainPost,Y); paramMap.put(p_category,Altenrating Current); query.setRange(0, 100); query.setOrdering(creationDate desc); try{ results = (List) query.executeWithMap(paramMap); }catch(Exception ex) { System.out.println(Exception occured + ex.getMessage()); } and i get the exception Exception occured Problem with query SELECT FROM com.next.sc.server.entity.Post WHERE mainPost== p_mainPost category== p_category PARAMETERS java.lang.String p_category ORDER BY creationDate desc RANGE 0,10: Right side of expression is of unexpected type: org.datanucleus.query.expression.VariableExpression Please help, its really annoying that i didnt change any thing in code and just upgrade of 1.2.2 is giving me this problem. Luckily i created another version of my application on upgrade, so now one version is working and another one is not, both have same source code except some jsp changes. Working Version 1 linkhttp://1.latest.sciencecanteen.appspot.com/postList.htm?cat=Altenrati... Not Working version 2 linkhttp://2.latest.sciencecanteen.appspot.com/postList.htm?cat=Altenrati...http://1.latest.sciencecanteen.appspot.com/postList.htm?cat=Altenrati... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---