[appengine-java] Please help me with mapping
Hi All, I need to clear a few doubts. Let's take an example so that you know what my doubt is : I have a User object and each user performs an operation - say a status update. User { private Long id; private ListStatusUpdate updates; } Now this seems all good but if I'm not wrong Appengine has no provision for lazy loading. Now my problem is, when a users StatusUpdate reaches say 100k or more, the List in the above case would have so many objects in it which I obviously do not need. What solution is better? Make StatusUpdate as an unowned class and keeping a reference to User? Any thoughts, I hope I am clear with my requirement. -Nischal -- 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] Please help me with mapping
you can keep a separate status class, which will store only one update per class. Every time user updates her status, create a new update class and persist it Update { private long userid; private string status; } when you need to display update just fetch all update entities where userid == User's id. On 13 June 2010 11:44, nischalshetty nischalshett...@gmail.com wrote: Hi All, I need to clear a few doubts. Let's take an example so that you know what my doubt is : I have a User object and each user performs an operation - say a status update. User { private Long id; private ListStatusUpdate updates; } Now this seems all good but if I'm not wrong Appengine has no provision for lazy loading. Now my problem is, when a users StatusUpdate reaches say 100k or more, the List in the above case would have so many objects in it which I obviously do not need. What solution is better? Make StatusUpdate as an unowned class and keeping a reference to User? Any thoughts, I hope I am clear with my requirement. -Nischal -- 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: Session object or memcache?
Session isn't lost but session use is discouraged. You have memcache which is pretty fast in retrieval. Of course, every once a while even the memcache can be invalidated due to various reasons. While relying on memcache you need to be sure that in case the value returned is null query the datastore. My app gets high traffic every hour. I do keep the user object in session and haven't come across any problems yet. -N On Jun 13, 6:33 am, Thomas mylee...@gmail.com wrote: Session is cached in memcache and persisted to datastore. So when loading request occurs it won't be lost if it is not expired. You can view session (_ah_SESSION) data with datastore viewer. On 6月11日, 下午11時09分, Rahul rahul.jun...@gmail.com wrote: No doubt if your application is low traffic you will definitely need memcache as session will be lost every minute when the jvm restarts and you need to reload everything and also session is highly discouraged due to various reasons. Thanks, Rahul -- 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: Please help me with mapping
Thank you Prashant. I guess that's the second option of disowned entities that you are talking about. Is that the best way to do this? -N On Jun 13, 11:20 am, Prashant nextprash...@gmail.com wrote: you can keep a separate status class, which will store only one update per class. Every time user updates her status, create a new update class and persist it Update { private long userid; private string status; } when you need to display update just fetch all update entities where userid == User's id. On 13 June 2010 11:44, nischalshetty nischalshett...@gmail.com wrote: Hi All, I need to clear a few doubts. Let's take an example so that you know what my doubt is : I have a User object and each user performs an operation - say a status update. User { private Long id; private ListStatusUpdate updates; } Now this seems all good but if I'm not wrong Appengine has no provision for lazy loading. Now my problem is, when a users StatusUpdate reaches say 100k or more, the List in the above case would have so many objects in it which I obviously do not need. What solution is better? Make StatusUpdate as an unowned class and keeping a reference to User? Any thoughts, I hope I am clear with my requirement. -Nischal -- 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. -- 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] Need help in writing a query
Hie Sorry for providing incomplete info. The complete entity is: Distt, City, Area, emp-name And the where clause is where distt == some dist so result should come like Hydarea1 5 hydarea2 20 Mum area3 5 Calarea5 8 Calarea6 9 So what is the solution in this case? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Sun, Jun 13, 2010 at 9:26 AM, aswath satrasala aswath.satras...@gmail.com wrote: Hi, I guess, this may not turn out to be correct always. If it is done in a transaction and both of the entities are in the same entity group, then this will work. -Aswath On Sat, Jun 12, 2010 at 8:24 PM, RAVINDER MAAN rsmaan...@gmail.comwrote: Instead of getting these values with query best option is to store this values when you add new employee.So create one more dataset with fields city, area and employeecount.whenever you add new employee update the count .then you can get the count with simple query select employeecount from newdataset where city==city area==area On Sat, Jun 12, 2010 at 8:05 PM, Vik vik@gmail.com wrote: Hie I have following data set: City, Area emp-name and have to write a query which shows number of employees by city and area. So data should display like: Delhirohini 5 Delhinehru10 Hyd madhapur 6 Hyd hitech 24 Cheanni park 20 So what the query should be? Please advise Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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.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: Please help me with mapping
I am not sure, it depends on what you want to implement. Anyway, storing 10k updates in a single entity will definitely exceed 1mb limit. Moreover, you wouldn't be needing all the updates at a time, it will be very inefficient implementation if you fetch all updates when you just need a few (say 10 or 20). Putting updates in a separate class will help you to implement efficient pagination. It will be easy to add and delete an updates. On 13 June 2010 11:54, nischalshetty nischalshett...@gmail.com wrote: Thank you Prashant. I guess that's the second option of disowned entities that you are talking about. Is that the best way to do this? -N On Jun 13, 11:20 am, Prashant nextprash...@gmail.com wrote: you can keep a separate status class, which will store only one update per class. Every time user updates her status, create a new update class and persist it Update { private long userid; private string status; } when you need to display update just fetch all update entities where userid == User's id. On 13 June 2010 11:44, nischalshetty nischalshett...@gmail.com wrote: Hi All, I need to clear a few doubts. Let's take an example so that you know what my doubt is : I have a User object and each user performs an operation - say a status update. User { private Long id; private ListStatusUpdate updates; } Now this seems all good but if I'm not wrong Appengine has no provision for lazy loading. Now my problem is, when a users StatusUpdate reaches say 100k or more, the List in the above case would have so many objects in it which I obviously do not need. What solution is better? Make StatusUpdate as an unowned class and keeping a reference to User? Any thoughts, I hope I am clear with my requirement. -Nischal -- 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 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: Please help me with mapping
yeah, I want to do something similar, guess having it mapped to the User object will make it inefficient. Will take your advice :) -N On Jun 13, 11:52 am, Prashant nextprash...@gmail.com wrote: I am not sure, it depends on what you want to implement. Anyway, storing 10k updates in a single entity will definitely exceed 1mb limit. Moreover, you wouldn't be needing all the updates at a time, it will be very inefficient implementation if you fetch all updates when you just need a few (say 10 or 20). Putting updates in a separate class will help you to implement efficient pagination. It will be easy to add and delete an updates. On 13 June 2010 11:54, nischalshetty nischalshett...@gmail.com wrote: Thank you Prashant. I guess that's the second option of disowned entities that you are talking about. Is that the best way to do this? -N On Jun 13, 11:20 am, Prashant nextprash...@gmail.com wrote: you can keep a separate status class, which will store only one update per class. Every time user updates her status, create a new update class and persist it Update { private long userid; private string status; } when you need to display update just fetch all update entities where userid == User's id. On 13 June 2010 11:44, nischalshetty nischalshett...@gmail.com wrote: Hi All, I need to clear a few doubts. Let's take an example so that you know what my doubt is : I have a User object and each user performs an operation - say a status update. User { private Long id; private ListStatusUpdate updates; } Now this seems all good but if I'm not wrong Appengine has no provision for lazy loading. Now my problem is, when a users StatusUpdate reaches say 100k or more, the List in the above case would have so many objects in it which I obviously do not need. What solution is better? Make StatusUpdate as an unowned class and keeping a reference to User? Any thoughts, I hope I am clear with my requirement. -Nischal -- 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.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%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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Task Queue java API
Hi i'm new to Task queue concept while reading about it i got struck on this line queue.add( DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(), TaskOptions().url(/path/to/my/worker)); What will DatastoreServiceFactory do... How to redirect this page to another servlet in the url i gave .url(/myservlet) but it doesnt redirected to servlet Please Help me. Regards, Sathish -- 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: Task Queue java API
Hi Sathish, I am not actually sure about your problem. But I agree that the documentation is a bit complicated to decode. I do like that: TaskOptions taskOptions = TaskOptions.Builder.url(/ servlet).param(param, param).method(Method.GET); //enqueue request Queue queue = QueueFactory.getQueue(somequeue); queue.add(taskOptions); In this example I do a GET request with one parameter. And I use a specific queue but you can also just get the default queue. On Jun 13, 9:14 am, sathish sathish.sha...@gmail.com wrote: Hi i'm new to Task queue concept while reading about it i got struck on this line queue.add( DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(), TaskOptions().url(/path/to/my/worker)); What will DatastoreServiceFactory do... How to redirect this page to another servlet in the url i gave .url(/myservlet) but it doesnt redirected to servlet Please Help me. Regards, Sathish -- 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: Session object or memcache?
can anybody provide good link for dos and donts for high traffic apps ? On Sun, Jun 13, 2010 at 11:52 AM, nischalshetty nischalshett...@gmail.comwrote: Session isn't lost but session use is discouraged. You have memcache which is pretty fast in retrieval. Of course, every once a while even the memcache can be invalidated due to various reasons. While relying on memcache you need to be sure that in case the value returned is null query the datastore. My app gets high traffic every hour. I do keep the user object in session and haven't come across any problems yet. -N On Jun 13, 6:33 am, Thomas mylee...@gmail.com wrote: Session is cached in memcache and persisted to datastore. So when loading request occurs it won't be lost if it is not expired. You can view session (_ah_SESSION) data with datastore viewer. On 6月11日, 下午11時09分, Rahul rahul.jun...@gmail.com wrote: No doubt if your application is low traffic you will definitely need memcache as session will be lost every minute when the jvm restarts and you need to reload everything and also session is highly discouraged due to various reasons. Thanks, Rahul -- 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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Task Queue java API
sathish... what you came across is a transactional way to add a task on a queue. Toby described how I do it too (without transactions). DatastoreServiceFactory.getDatastoreService().getCurrentTransaction() is a low-level API way of retrieving the current datastore transaction. If you add a task to a queue with the transaction, if the transaction fails, the task will not be added on the queue. The task will be added only if transaction commit succeeds. Are you trying to add tasks transactionally or just add tasks? If you don't care about transactions, do it like Toby showed. By the way, you will not be redirected anywhere. queue.add(...) is asynchronous and your servlet will exit. The url you're providing is to your task servlet web hook that will get executed at a later time. On Jun 13, 4:52 am, Toby toby.ro...@gmail.com wrote: Hi Sathish, I am not actually sure about your problem. But I agree that the documentation is a bit complicated to decode. I do like that: TaskOptions taskOptions = TaskOptions.Builder.url(/ servlet).param(param, param).method(Method.GET); //enqueue request Queue queue = QueueFactory.getQueue(somequeue); queue.add(taskOptions); In this example I do a GET request with one parameter. And I use a specific queue but you can also just get the default queue. On Jun 13, 9:14 am, sathish sathish.sha...@gmail.com wrote: Hi i'm new to Task queue concept while reading about it i got struck on this line queue.add( DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(), TaskOptions().url(/path/to/my/worker)); What will DatastoreServiceFactory do... How to redirect this page to another servlet in the url i gave .url(/myservlet) but it doesnt redirected to servlet Please Help me. Regards, Sathish -- 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] Appengine datastore phantom entity - inconsistent state?
Getting a weird error on java appengine code that used to work fine (nothing has changed but the data in the datastore). I'm trying to iterate over the results of a query and change a few properties of the entities. The query does return a set of results, however, when I try to access the first result in the list, it throws an exception when trying to access any of its properties (but its key). Here's the exception: org.datanucleus.state.JDOStateManagerImpl isLoaded: Exception thrown by StateManager.isLoaded Could not retrieve entity of kind OnTheCan with key OnTheCan(3204258) org.datanucleus.exceptions.NucleusObjectNotFoundException: Could not retrieve entity of kind OnTheCan with key OnTheCan(3204258) at org.datanucleus.store.appengine.DatastoreExceptionTranslator.wrapEntityNotFoundException(DatastoreExceptionTranslator.java: 60) And here is my code: PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = null; ListOnTheCan cans; query = pm.newQuery(SELECT this FROM + OnTheCan.class.getName() + WHERE open == true ORDER BY onTheCanId ASC); query.setRange(0, num); cans = (ListOnTheCan) query.execute(); for (OnTheCan c : cans) { System.err.println(c.getOnTheCanId()); // this works fine! getting the key works c.setOpen(false); // failure here with the above exception c.setAutoClosed(true); c.setEndTime(new Date(c.getStartTime().getTime() + 60/ *10*60*1000*/)); } pm.close(); The code throws the exception when trying to execute c.setOpen(false) - thats the first time I'm accessing or setting a property that isnt the key. So it seems there is a phantom entity in my datastore with key 3204258. THis entity doesn't really exist (queried the datastore from admin console) but for some reason its being returned by the query. Could my data store be in an inconsistent state? I've managed the following workaround by placing it as the first line in my for loop. Clearly an ugly hack: if (c.getOnTheCanId() == 3204258) { continue; } Any ideas? -- 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] javaassist, AspectJ, Will it play?
I saw no mention of Javaassit or AspectJ on the Will it play page. Do these work in App Engine? 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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] jsp-config
Can somebody confirm that jsp-config in web.xml to globally enable EL is supported? jsp-config jsp-property-group el-ignoredfalse/el-ignored /jsp-property-group /jsp-config For me it is not working and I have to add %@ page isELIgnored=false % to all jsp pages. Cumbersome... -- 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] .jspx files not parsed
Hi, I have a little app that runs fine on local dev appengine, but appengine itself is not parsing+executing my .jspx files. The jspx files are in WEB-INF so they should not be excluded by appengine (as a static resource) I am using Apache Tiles to define my views. So the html produced looks like this: html xmlns:jsp=http://java.sun.com/JSP/Page; xmlns:c=http://java.sun.com/jsp/jstl/core; xmlns:tiles=http://tiles.apache.org/tags-tiles; jsp:output omit-xml-declaration=yes/ jsp:directive.page contentType=text/html;charset=UTF-8 / jsp:directive.page isELIgnored=false/ (etc etc) Does anybody have an idea what I'm doing wrong? Regards, Hans -- 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] Server Error (500) some other problems
Hi, I was working on NetBeans and deploying my project succesfully, when at 6th updating I saw an error: 20% Scanning files on local disk. 25% Initiating update. Error Details: 2010-06-12 23:24:36 org.apache.jasper.JspC processFile INFO: Built File: \index.jsp 2010-06-12 23:24:37 org.apache.jasper.JspC processFile INFO: Built File: \main.jsp java.io.IOException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=el-pageversion=1; 500 Internal Server Error Server Error (500) A server error has occurred. Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=el-pageversion=1; 500 Internal Server Error Server Error (500) A server error has occurred. By the way, I have one problem. I use jsp:beans in my project which runs perfect on my localhost, when I'm running local serwer on my computer, but on google app engine I see errors on my page: http://el-page.appspot.com/ ${message.data} - it suposed to be invisible until press button with wrong login/pwd and should work :/ How can I resolve this proglem? -- 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] Content is not allowed in prolog when parsing perfectly valid XML on GAE
Hey guys, I've been beating my head against this absolutely infuriating bug for the last 48 hours, so I thought I'd finally throw in the towel and try asking here before I throw my laptop out the window. I'm trying to parse the response XML from a call I made to AWS SimpleDB. The response is coming back on the wire just fine; for example, it may look like: ?xml version=1.0 encoding=utf-8? ListDomainsResponse xmlns=http://sdb.amazonaws.com/doc/ 2009-04-15/ListDomainsResultDomainNameAudio/ DomainNameDomainNameCourse/ DomainNameDomainNameDocumentContents/ DomainNameDomainNameLectureSet/DomainNameDomainNameMetaData/ DomainNameDomainNameProfessors/DomainNameDomainNameTag/ DomainName/ListDomainsResultResponseMetadataRequestId42330b4a- e134-6aec-e62a-5869ac2b4575/RequestIdBoxUsage0.071759/ BoxUsage/ResponseMetadata/ListDomainsResponse I pass in this XML to a parser with XMLEventReader eventReader = xmlInputFactory.createXMLEventReader(response.getContent()); and call eventReader.nextEvent(); a bunch of times to get the data I want. Here's the bizarre part -- it works great inside the local server. The response comes in, I parse it, everyone's happy. The problem is that when I deploy the code to Google App Engine, the outgoing request still works, and the response XML seems 100% identical and correct to me, but the response fails to parse with the following exception: com.amazonaws.http.HttpClient handleResponse: Unable to unmarshall response (ParseError at [row,col]:[1,1] Message: Content is not allowed in prolog.): ?xml version=1.0 encoding=utf-8? ListDomainsResponse xmlns=http://sdb.amazonaws.com/doc/ 2009-04-15/ListDomainsResultDomainNameAudio/ DomainNameDomainNameCourse/ DomainNameDomainNameDocumentContents/ DomainNameDomainNameLectureSet/DomainNameDomainNameMetaData/ DomainNameDomainNameProfessors/DomainNameDomainNameTag/ DomainName/ListDomainsResultResponseMetadataRequestId42330b4a- e134-6aec-e62a-5869ac2b4575/RequestIdBoxUsage0.071759/ BoxUsage/ResponseMetadata/ListDomainsResponse javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source) at com.sun.xml.internal.stream.XMLEventReaderImpl.nextEvent(Unknown Source) at com.amazonaws.transform.StaxUnmarshallerContext.nextEvent(StaxUnmarshallerContext.java: 153) ... (rest of lines omitted) I have double, triple, quadruple checked this XML for 'invisible characters' or non-UTF8 encoded characters, etc. I looked at it byte- by-byte in an array for byte-order-marks or something of that nature. Nothing; it passes every validation test I could throw at it. Even stranger, it happens if I use a Saxon-based parser as well -- but ONLY on GAE, it always works fine in my local environment. It makes it very hard to trace the code for problems when I can only run the debugger on an environment that works perfectly (I haven't found any good way to remotely debug on GAE). Nevertheless, using the primitive means I have, I've tried a million approaches including: * XML with and without the prolog * With and without newlines * With and without the encoding= attribute in the prolog * Both newline styles * With and without the chunking information present in the HTTP stream And I've tried most of these in multiple combinations where it made sense they would interact -- nothing! I'm at my wit's end. Has anyone seen an issue like this before that can hopefully shed some light on it? Thanks! -Adrian -- 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] Where is the datastore file on windows?
Use below Java code: private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory(transactions-optional); Category c1 = new Category(); c1.setCategoryId(FISH); c1.setDescription(image src=\../images/fish_icon.gif\font size=\5\ color=\blue\ Fish/font); c1.setName(FISH); pm.makePersistent(c1); Run it as Google Web Application in Eclipse on Windows. I think the App Engine persistent the data to the disk, any one know where is it? Or am I wrong? -- 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] Java applet-servlet-db
Hi, Im new to developing Java especialy in GAE. I wondered if this scenario would be possible: MVC application: The View component is an applet running on another server. The Controller component is a servlet accessing a MySQL database also on another server which pools the connections, these are obviously accessible from the applet. Am I correct in assuming that the servlet can be hosted on GAE, that it can connect via JDBC to a MySQL database on another server and then be accessed by the applet which is hosted elswhere? I appologise if there is some vaugeness (I am still learning) in what Im asking. Thanks for your time. -- 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] jsp-config
W dniu 2010-06-13 20:51, Marcel Overdijk pisze: Can somebody confirm that jsp-config in web.xml to globally enable EL is supported? jsp-config jsp-property-group el-ignoredfalse/el-ignored /jsp-property-group /jsp-config For me it is not working and I have to add%@ page isELIgnored=false % to all jsp pages. Cumbersome... Hi, I had the same problem, it's true that u must add %@ page isELIgnored=false % - but not like this! u must insert isELIgnored=false into a line, just like I have: %...@page isELIgnored=false contentType=text/html pageEncoding=UTF-8% on the top of your .jsp's GL -- 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: Minor issues with Struts 2 Tags
Hi I have the same problem ... Try to use JSTL ... or write the url in the JSP code Regards On 4 jun, 05:13, Andrew am2...@gmail.com wrote: Hi, I have set up struts using the method described at this page: http://whyjava.wordpress.com/2009/08/30/creating-struts2-application-... Everything I have tried so far works fine, except for one little thing. If I try this code from the Struts Tutorial (https://cwiki.apache.org/ WW/using-struts-2-tags.html): s:urlaction=hello var=helloLink s:param name=userNameBruce Phillips/s:param /s:url pa href=${helloLink}Hello Bruce Phillips/a/p The link is renedered ashttp://localhost:8080/${helloLink} Other struts tags are working, so my app is definitely picking them up. It just seemed to work incorrectly in this case. I wondered if it was something to do with the freemarker modifications that were made in order to get things running on GAE. Can anyway else reproduce this? I'm using GAE 1.3.4 with Struts 2.1.8 via the Eclipse Plugin. -- 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: Session object or memcache?
Google appengine stores session data in the App Engine datastore for persistence, and also uses memcache for speed. Using the AppEngine implementation of sessions for Java, you are using a combination of datastore and memcache and this solution is transparent from the development point of view. Hope this help, Regards, Jose Miguel Bataller On Jun 11, 4:12 pm, RAVINDER MAAN rsmaan...@gmail.com wrote: I was not aware about loss of session objects.strange!! On Fri, Jun 11, 2010 at 8:39 PM, Rahul rahul.jun...@gmail.com wrote: No doubt if your application is low traffic you will definitely need memcache as session will be lost every minute when the jvm restarts and you need to reload everything and also session is highly discouraged due to various reasons. Thanks, Rahul On Jun 11, 4:16 am, RAVINDER MAAN rsmaan...@gmail.com wrote: Hello all what is the best option from performance point of view, storing frequently used objects in session or loading from datastore for every request(we can add memcache support before trying to fetch from datastore).Can anybody tell me good link to develop high performance and fast application development best practices link.I am using java with JDO. thanks in advance. -- 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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: javaassist, AspectJ, Will it play?
Javaassit works fine. We use it to create classes at run-time. The problem is with current start-up time on GAE, adding code generation in our application was slowing us down by 2 sec. So we moved all the code generation to build time. We still use Javaassit in GAE development environment . -- 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] Where is the datastore file on windows?
It's located at Eclipse workspace\Your app\war\WEB-INF\appengine-generated ... On Sun, Jun 13, 2010 at 3:25 PM, quqtalk quqt...@gmail.com wrote: Use below Java code: private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory(transactions-optional); Category c1 = new Category(); c1.setCategoryId(FISH); c1.setDescription(image src=\../images/fish_icon.gif\font size=\5\ color=\blue\ Fish/font); c1.setName(FISH); pm.makePersistent(c1); Run it as Google Web Application in Eclipse on Windows. I think the App Engine persistent the data to the disk, any one know where is it? Or am I wrong? -- 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: javaassist, AspectJ, Will it play?
I tried AspectJ+Spring and it works.. AspectJ load time weaving does not work.. you have to use AspectJ compile time weaving. SN On Mon, Jun 14, 2010 at 10:33 AM, Vlad Skarzhevskyy skarzhevs...@gmail.comwrote: Javaassit works fine. We use it to create classes at run-time. The problem is with current start-up time on GAE, adding code generation in our application was slowing us down by 2 sec. So we moved all the code generation to build time. We still use Javaassit in GAE development environment . -- 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. -- Sudhir Ramanandi http://www.ramanandi.org -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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.