[appengine-java] Re: ByPassing Google App Engine SDK to allow black listed classes
Alright I have followed to allow the blacklisted classes to be exempted from the validation in eclipse and it did not show any error in my eclipse IDE anymore, so the class is compiled. But when I tried to run the application(still using the app engine web server) it would still throw the security error that the use of FileWriter is not allowed. Therefore we would still need to deploy my web application into another web container such as tomcat, while it makes the development of the web application very complex. I hope anyone from google could pin-point a way to do this. On Jan 22, 1:24 pm, ivanceras ivance...@gmail.com wrote: Hello Miguel, Thanks for the link. Just a quick question here if you have tried it. That this mean if I exclude the validation, my code will now be able to use the blacklisted classes? Thanks, ivanceras On Jan 22, 3:51 am, Miguel Méndez mmen...@google.com wrote: See if the following link helps:http://code.google.com/eclipse/docs/appengine_validation.html. On Thu, Jan 21, 2010 at 4:08 AM, ivanceras ivance...@gmail.com wrote: Is there a way to circumbent google app engine sdk to allow the usage of classes that are not present in the GAE JRE white list? I know the app that I would be building would not run in appspot, but at least in my development server, I need to access a postgresql database (java.net.socket.*) and generate some files(java.io.FileWriter) in my development server. -- 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. -- Miguel -- 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: ByPassing Google App Engine SDK to allow black listed classes
Hi, I faced the same problem while porting FOP to appengine. The only difference is that I did want to write to the filesystem or such. In my case I only had to provide FOP an implementation of some awt graphic classes. What I did was to change in fop sources every reference to java.awt in myjava.awt and provide the sources for java.awt classes (and every dependencies) from gnu classpath jvm implementation (obviously with the namespace changed to myjava.awt. That way, I have been able to trick GAE and make it use some blacklisted classes. In your case, I don't think is possible, because FileWriter classes rely on native code that GAE's jvm implementation doesn't provide you. Cristian. On 01/22/2010 09:43 AM, ivanceras wrote: Alright I have followed to allow the blacklisted classes to be exempted from the validation in eclipse and it did not show any error in my eclipse IDE anymore, so the class is compiled. But when I tried to run the application(still using the app engine web server) it would still throw the security error that the use of FileWriter is not allowed. Therefore we would still need to deploy my web application into another web container such as tomcat, while it makes the development of the web application very complex. I hope anyone from google could pin-point a way to do this. On Jan 22, 1:24 pm, ivancerasivance...@gmail.com wrote: Hello Miguel, Thanks for the link. Just a quick question here if you have tried it. That this mean if I exclude the validation, my code will now be able to use the blacklisted classes? Thanks, ivanceras On Jan 22, 3:51 am, Miguel Méndezmmen...@google.com wrote: See if the following link helps:http://code.google.com/eclipse/docs/appengine_validation.html. On Thu, Jan 21, 2010 at 4:08 AM, ivancerasivance...@gmail.com wrote: Is there a way to circumbent google app engine sdk to allow the usage of classes that are not present in the GAE JRE white list? I know the app that I would be building would not run in appspot, but at least in my development server, I need to access a postgresql database (java.net.socket.*) and generate some files(java.io.FileWriter) in my development server. -- 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. -- Miguel -- 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: error is coming on appspot but local working fine
Hello This is my class file : package com.ei.server.web.fe; import java.util.Date; import java.util.Map; import org.springframework.web.multipart.MultipartFile; import com.ei.server.model.auth.IUser; import com.ei.server.model.auth.impl.User; public class ReviewFrmCmd { private String title; private Long category; private String review; private String tags; private Boolean recommend; private MapLong, String categories; private Date date; private IUser user; private Character status; private Long id; private Long rating; private MapInteger, String ratingCombo; private MultipartFile picture; private Long city; private String company; private String product; private Long companyId; private Long productId; private String cityName; private String catPraentName; private String catName; private byte[] pictureUploaded ; public byte[] getPictureUploaded() { return pictureUploaded; } public void setPictureUploaded(byte[] pictureUploaded) { this.pictureUploaded = pictureUploaded; } public String getCatPraentName() { return catPraentName; } public void setCatPraentName(String catPraentName) { this.catPraentName = catPraentName; } public String getCatName() { return catName; } public void setCatName(String catName) { this.catName = catName; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public void setDate(Date date) { this.date = date; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Long getCategory() { return category; } public void setCategory(Long category) { this.category = category; } public MapLong, String getCategories() { return categories; } public void setCategories(MapLong, String categories) { this.categories = categories; } public String getReview() { return review; } public void setReview(String review) { this.review = review; } public String getTags() { return tags; } public void setTags(String tags) { this.tags = tags; } public Date getDate() { return date; } public IUser getUser() { return user; } public void setUser(User user) { this.user = user; } public Character getStatus() { return status; } public void setStatus(Character status) { this.status = status; } public Long getRating() { return rating; } public void setRating(Long rating) { this.rating = rating; } public Boolean getRecommend() { return recommend; } public void setRecommend(Boolean recommend) { this.recommend = recommend; } public MapInteger, String getRatingCombo() { return ratingCombo; } public MultipartFile getPicture() { return picture; } public void setPicture(MultipartFile picture) { this.picture = picture; } public void setRatingCombo(MapInteger, String ratingCombo) { this.ratingCombo = ratingCombo; } public Long getCity() { return city; } public void setCity(Long city) { this.city = city; } public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } public String getProduct() { return product; } public void setProduct(String product) { this.product = product; } public Long getCompanyId() { return companyId; } public void setCompanyId(Long companyId) { this.companyId = companyId; } public Long getProductId() { return productId; } public void setProductId(Long productId) { this.productId = productId; } public String getCityName() { return cityName; } public void setCityName(String cityName) {
Re: [appengine-java] Problem running GAE + GWT wizzard project
Hi, Can you try clearing your browser's cookies and seeing if this fixes the problem? Rajeev On Thu, Jan 14, 2010 at 7:00 AM, Ice13ill andrei.fifi...@gmail.com wrote: Hello, i'm using gwt + gae in Eclipse Galileo and i'm trying to run the project created with the Web Application wizzard. After the project is created using GWT and GAE sdk (2.0 and 1.3.0) i tried running the application, but i get this exception when loading the page: Initializing AppEngine server The server is running at http://localhost:/ Jan 14, 2010 12:00:10 PM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: EXCEPTION java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java: 881) at com.google.appengine.tools.development.LocalHttpRequestEnvironment.init (LocalHttpRequestEnvironment.java:45) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:348) 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) I did not found any posts regarding this problem. I'm just trying to run the created app by the wizzard, that's all I'm running it in Ubuntu 9.04, Mozilla Firefox, Eclipse galileo, Java 1.6.0_14 sdk Pls help! -- 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: Eclipse hangs at startup, Ubuntu
Hi, What is the name of your project, and the name of your App Engine SDK? I'm trying to decipher (in our code) where the message Updating myproject/...ne - 1.3.0 comes from. When Eclipse starts up, the SDKs will automatically copy over the necessary jars to your project's war/WEB-INF/lib folder. I think that's what is happening here. This should not cause a freeze-up in the IDE though. Is your war/WEB-INF/lib folder version-controlled, and are you using some sort of version-control plugin in Eclipse? If so, does it help if you remove the war/WEB-INF/lib folder from version control? Rajeev On Thu, Jan 14, 2010 at 7:33 AM, pgoetz pgo...@pgoetz.de wrote: On Jan 14, 11:41 am, Blessed Geek blessedg...@gmail.com wrote: Is any of your resources sitting in a foreign file system like smb, ntfs or nfs? No, all of my resources are local. They are attached to a SVN repository, but the subversion plugin does not communicate with the repository at that time. And do you have many projects mounted like I do? I had the same problem and I had to kill/restart the connector process to the foreign file system, whenever this happens. I would notice thrashing going own in the connection and eclipse got stuck. Again no. It is the only project in this workspace (just a test project). [...] Perhaps, you could turn autobuild off everytime you exit eclipse so that it when eclipse is started, it would not autobuild - and turn it back on when eclipse startup has quieted down. That was a hint in the right direction, I think. I have disabled the google plugin, closed the project, reactivated the plugin and after a startup and some time for eclipse to organize itself, I opened the project. That did the trick. In my opinion this is not a very elegant solution, but it works for me so far. Thank you very much for your help! Greetings, Peter -- 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] Getting error when updated from 1.2.5 to 1.3.0
Looking at the code, it seems that problem may be cookie related. Can you try clearing your browser's cookies and see if that helps the situation? On Wed, Jan 20, 2010 at 9:45 PM, mar_novice mariocape1...@gmail.com wrote: I can't run anymore after I updated the sdk and even downloading a fresh eclipse and gae plugin, I always get the same error. Initializing AppEngine server The server is running at http://localhost:/ 01 21, 10 2:30:15 AM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: EXCEPTION java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java: 881) at com.google.appengine.tools.development.LocalHttpRequestEnvironment.init (LocalHttpRequestEnvironment.java:45) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:348) 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) 01 21, 10 2:30:47 AM com.google.apphosting.utils.jetty.JettyLogger warn and I have noticed, instead of http://localhost:8080/, it is now http://localhost:/.. can anyone help?? -- 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: ByPassing Google App Engine SDK to allow black listed classes
Okay did not realize that you actually needed to use the class when actually deploying to GAE. Not sure of the best way to accomplish what you are after. On Fri, Jan 22, 2010 at 3:43 AM, ivanceras ivance...@gmail.com wrote: Alright I have followed to allow the blacklisted classes to be exempted from the validation in eclipse and it did not show any error in my eclipse IDE anymore, so the class is compiled. But when I tried to run the application(still using the app engine web server) it would still throw the security error that the use of FileWriter is not allowed. Therefore we would still need to deploy my web application into another web container such as tomcat, while it makes the development of the web application very complex. I hope anyone from google could pin-point a way to do this. On Jan 22, 1:24 pm, ivanceras ivance...@gmail.com wrote: Hello Miguel, Thanks for the link. Just a quick question here if you have tried it. That this mean if I exclude the validation, my code will now be able to use the blacklisted classes? Thanks, ivanceras On Jan 22, 3:51 am, Miguel Méndez mmen...@google.com wrote: See if the following link helps: http://code.google.com/eclipse/docs/appengine_validation.html. On Thu, Jan 21, 2010 at 4:08 AM, ivanceras ivance...@gmail.com wrote: Is there a way to circumbent google app engine sdk to allow the usage of classes that are not present in the GAE JRE white list? I know the app that I would be building would not run in appspot, but at least in my development server, I need to access a postgresql database (java.net.socket.*) and generate some files(java.io.FileWriter) in my development server. -- 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. -- Miguel -- 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. -- Miguel -- 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] Request was aborted after waiting too long to attempt to service your request.
I'm getting this log message a lot in my application: Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.html for more details. I do have excessive latency in that I run non-trivial tasks in the TaskQueue handlers interacting with external systems averaging about 10 seconds per handler with a couple per cycle pushing the 30 second limit, but on the Dashboard my requests/second never seem to exceed ~1.5. I have billing enabled and my understanding is that gives me 500 simultaneous requests. Which if all of my TaskQueues were executing at once I don't think I'd reach, although it might get close. But wouldn't that show on the dashboard? Is there anything else that could be causing this? I see the DataStore has been in Anomoly for the past few days, but nobody seems worried about it and assume roughly this latency will be normal. Thanks, -C -- 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] Request was aborted after waiting too long to attempt to service your request.
On Fri, Jan 22, 2010 at 10:55 AM, Millisecond millisec...@gmail.com wrote: I'm getting this log message a lot in my application: Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.htmlfor more details. I do have excessive latency in that I run non-trivial tasks in the TaskQueue handlers interacting with external systems averaging about 10 seconds per handler with a couple per cycle pushing the 30 second limit, but on the Dashboard my requests/second never seem to exceed ~1.5. I have billing enabled and my understanding is that gives me 500 simultaneous requests. That's not accurate. Where did you hear this? Here's the documentation we have on this: http://code.google.com/appengine/docs/java/runtime.html says: *** An application can process around 30 active dynamic requests simultaneously. This means that an application whose average server-side request processing time is 75 milliseconds can serve up to (1000 ms/second / 75 ms/request) * 30 = 400 requests/second without incurring any additional latency. Applications that are heavily CPU-bound may incur some additional latency in long-running requests in order to make room for other apps sharing the same servers. Requests for static files are not affected by this limit. *If your application is making efficient use of resources and traffic is about to exceed your expected maximum queries per second, you can request that the simultaneous dynamic request limit be raisedhttp://code.google.com/appengine/kb/billing.html#cpu. App Engine can scale far beyond 30 simultaneous requests; this default limit is in place to prevent a poorly performing or malicious app from hoarding resources.* I suggest that you calculate the maximum number of simultaneous requests that you need to serve and fill out the above form. Thanks, Don -- 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: Request was aborted after waiting too long to attempt to service your request.
I have seen this error even for hello world. It MAY be caused by too many simultaneous requests, but it also may be caused by a problem with appengine itself. On Jan 22, 12:30 pm, Don Schwarz schwa...@google.com wrote: On Fri, Jan 22, 2010 at 10:55 AM, Millisecond millisec...@gmail.com wrote: I'm getting this log message a lot in my application: Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please seehttp://code.google.com/appengine/docs/quotas.htmlformore details. I do have excessive latency in that I run non-trivial tasks in the TaskQueue handlers interacting with external systems averaging about 10 seconds per handler with a couple per cycle pushing the 30 second limit, but on the Dashboard my requests/second never seem to exceed ~1.5. I have billing enabled and my understanding is that gives me 500 simultaneous requests. That's not accurate. Where did you hear this? Here's the documentation we have on this: http://code.google.com/appengine/docs/java/runtime.htmlsays: *** An application can process around 30 active dynamic requests simultaneously. This means that an application whose average server-side request processing time is 75 milliseconds can serve up to (1000 ms/second / 75 ms/request) * 30 = 400 requests/second without incurring any additional latency. Applications that are heavily CPU-bound may incur some additional latency in long-running requests in order to make room for other apps sharing the same servers. Requests for static files are not affected by this limit. *If your application is making efficient use of resources and traffic is about to exceed your expected maximum queries per second, you can request that the simultaneous dynamic request limit be raisedhttp://code.google.com/appengine/kb/billing.html#cpu. App Engine can scale far beyond 30 simultaneous requests; this default limit is in place to prevent a poorly performing or malicious app from hoarding resources.* I suggest that you calculate the maximum number of simultaneous requests that you need to serve and fill out the above form. Thanks, Don -- 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: Request was aborted after waiting too long to attempt to service your request.
Ah, you're right, only this bit stuck in my head quotas with billing enabled can accommodate around 500 requests per second from http://code.google.com/appengine/docs/quotas.html Thanks for the pointer to the math working that number back from the 30 request / s limit. Seems a little optimistic though that a request could be handled in 75ms (or faster with the -implied- math on the quota page) with the average query latency these days being way over that itself. Here's hoping those come down soon. Also thanks for the pointer to upping the limit. -C On Jan 22, 9:30 am, Don Schwarz schwa...@google.com wrote: On Fri, Jan 22, 2010 at 10:55 AM, Millisecond millisec...@gmail.com wrote: I'm getting this log message a lot in my application: Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please seehttp://code.google.com/appengine/docs/quotas.htmlformore details. I do have excessive latency in that I run non-trivial tasks in the TaskQueue handlers interacting with external systems averaging about 10 seconds per handler with a couple per cycle pushing the 30 second limit, but on the Dashboard my requests/second never seem to exceed ~1.5. I have billing enabled and my understanding is that gives me 500 simultaneous requests. That's not accurate. Where did you hear this? Here's the documentation we have on this: http://code.google.com/appengine/docs/java/runtime.htmlsays: *** An application can process around 30 active dynamic requests simultaneously. This means that an application whose average server-side request processing time is 75 milliseconds can serve up to (1000 ms/second / 75 ms/request) * 30 = 400 requests/second without incurring any additional latency. Applications that are heavily CPU-bound may incur some additional latency in long-running requests in order to make room for other apps sharing the same servers. Requests for static files are not affected by this limit. *If your application is making efficient use of resources and traffic is about to exceed your expected maximum queries per second, you can request that the simultaneous dynamic request limit be raisedhttp://code.google.com/appengine/kb/billing.html#cpu. App Engine can scale far beyond 30 simultaneous requests; this default limit is in place to prevent a poorly performing or malicious app from hoarding resources.* I suggest that you calculate the maximum number of simultaneous requests that you need to serve and fill out the above form. Thanks, Don -- 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] Apache CXF(JAX-RS) on GAE
I have successfully deployed a CXF-RS app on GAE by making some changes in CXF source. Details can be found here http://sinister2010.wordpress.com/2010/01/22/cxf-rs-on-google-app-engine-exposed3/ It maybe of some help. -- 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] deleting all entries in datastore
Suppose I have a class A and I have stored some instance of it in the datastore. Then I change it, but I keep the name. How I can delete all the previous data in the datastore, if I simply do a query and use deleteAll, it gives an error (I guess because I changed the name of some fields). Thank you. Mete -- 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] unable to use user services with java - 500 Server Error
Hi all, i'm trying to use google app engine to build my first apps using java. i'm new to java but i would like to use app engine to train myself for web app developing. i've got some issues using the users services. these are my servlets: /* * TestingUsers.java */ package mytrainingapp; import java.io.IOException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.google.appengine.api.users.UserService; import com.google.appengine.api.users.UserServiceFactory; public class TestingUsers extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { UserService userService = UserServiceFactory.getUserService(); String newline = System.getProperty(line.separator); String data = req.getParameter(date); String nick = req.getUserPrincipal().getName(); resp.setContentType(text/plain); resp.getWriter().println(I parametri da te inviati sono: + newline + data: + data + newline + nick: + nick); } } /* * CatchParameter.java */ package mytrainingapp; import java.io.IOException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class CatchParameter extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String newline = System.getProperty(line.separator); String data = req.getParameter(date); resp.setContentType(text/plain); resp.getWriter().println(I parametri da te inviati sono: + newline + data: + data); } } /* * CalendarServlet.java */ package mytrainingapp; import java.io.IOException; import javax.servlet.http.*; import java.util.*; import java.text.DateFormat; import java.text.SimpleDateFormat; public class CalendarServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String newline = System.getProperty(line.separator); resp.setContentType(text/calendar); String startVCard = BEGIN:VCALENDAR + newline + VERSION:2.0 + newline + CALSCALE:GREGORIAN + newline + METHOD:PUBLISH + newline + X-WR-CALNAME:Time Tracker + newline + X-WR-TIMEZONE:UTC + newline + X-WR-CALDESC:Time tracking utility - Vidiemme.it + newline; String endVCard = END:VCALENDAR; String events = ; for(int i = 1; i = 31; i++){ String day; if(i 10){ day = 0 + i; } else { day = + i; } String dayAfter; int z; if(i 9){ z = i + 1; dayAfter = 0 + z; }else{ z = i + 1; dayAfter = + z; } events = events + BEGIN:VEVENT + newline + DTSTART;VALUE=DATE:201001 + day + newline + DTEND;VALUE=DATE:201001 + dayAfter + newline + SUMMARY:Time Tracking giorno 201001 + day + newline + ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ- PARTICIPANT;PARTSTAT=ACCEPTED;CN=Time tracking utility - Vidiemme.it;X- NUM-GUEST=0 + newline + X-GOOGLE-CALENDAR-CONTENT-ICON:http://vidiemmeit.appspot.com/ favicon.ico + newline + X-GOOGLE-CALENDAR-CONTENT-URL:http://vidiemmeit.appspot.com/ catchparameter?date= + 201002 + day + newline + X-GOOGLE-CALENDAR-CONTENT-TYPE:text/html + newline + X-GOOGLE-CALENDAR-CONTENT-WIDTH:330 + newline + X-GOOGLE-CALENDAR-CONTENT-HEIGHT:100 + newline + CLASS:PUBLIC + newline + CREATED:20100101T00Z + newline + LAST-MODIFIED:20100101T00Z + newline + RRULE:FREQ=YEARLY + newline + SEQUENCE:1 + newline + STATUS:CONFIRMED + newline + END:VEVENT + newline; } resp.getWriter().println(startVCard + events + endVCard); } } /* * web.xml */ ?xml version=1.0 encoding=utf-8? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; version=2.5 servlet servlet-namecalendar/servlet-name servlet-classmytrainingapp.CalendarServlet/servlet-class /servlet servlet
[appengine-java] Re: javax.annotation.Resource Spring 3.0.0.Release declarative DI on Google App Engine
This is of some help to those who are trying for CXF-RS apps on GAE http://sinister2010.wordpress.com/2010/01/22/cxf-rs-on-google-app-engine-exposed3/ On Jan 14, 12:43 am, Jason (Google) apija...@google.com wrote: Hi Ralf. We may be able to add support for this annotation in a forthcoming release. Please star the issue in your post if you want to be notified of any status changes. - Jason On Sat, Jan 2, 2010 at 3:27 AM, Ralf Sigmund ralf.sigm...@gmail.com wrote: Hi, i am a newbie to App Engine. So I tried to do some of my Spring 3.0.0.RELEASE demo stuff. When using my favourite JAX-RS Implementation (Apache CXF 2.3.0- SNAPSHOT) I ran into the following Problem: CXF uses @Resource Annotations for Declarative Dependency Injection. But javax.annotation.Resource is not on the Whitelist. Only javax.annotation.Generated javax.annotation.PostConstruct javax.annotation.PreDestroy can be found on http://code.google.com/intl/de-DE/appengine/docs/java/jrewhitelist.html . Consequentely I get the StackTrace: java.lang.NoClassDefFoundError: javax.annotation.Resource is a restricted class. Please see the Google App Engine developer's guide for more details. Well - I did not find a clear explanation what is wrong with @Resource and why it is excluded from the Whitelist. There is also an issue http://code.google.com/p/googleappengine/issues/detail?id=2564 on this topic. But without any comment. Maybe there is a simple explanation / workaround to this situation and some kind soul could respond? Best Regards Ralf -- 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] deleting all entries in datastore
Here is the code I use to delete one kind at a time - it batches the keys into Lists of 100 to avoid datastore exceptions. Iterables is from Google collections. Query query = new Query(kind); query.setKeysOnly(); DatastoreService datastore = ... IterableEntity entityIterator = datastore.prepare(query).asIterable(); IterableKey keyIterator = Iterables.transform(entityIterator, new FunctionEntity, Key() { public Key apply(Entity arg0) { return arg0.getKey(); } }); IterableListKey partitioned = Iterables.partition(keyIterator, 100); for (ListKey sublist : partitioned) { datastore.delete(sublist); } On 22 Jan 2010, at 15:10, mete wrote: Suppose I have a class A and I have stored some instance of it in the datastore. Then I change it, but I keep the name. How I can delete all the previous data in the datastore, if I simply do a query and use deleteAll, it gives an error (I guess because I changed the name of some fields). Thank you. Mete -- 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] Discussion on will-it-play-in-app-engine
Hi Jeff S I've added more working examples in GAE of ItsNat framework and fixed problems. The phrase It works including AJAX: http://itsnatfeatshow.appspot.com/servlet?itsnat_doc_name=manual.core.example; Can now be shorter: It works including AJAX: http://itsnatfeatshow.appspot.com; 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] Re: deleting all entries in datastore
It would be good to have the ability to do this from within the GUI. Other database management tools have empty table options, so a delete all of this Kind feature would be appropriate. On Jan 22, 12:59 pm, John Patterson jdpatter...@gmail.com wrote: Here is the code I use to delete one kind at a time - it batches the keys into Lists of 100 to avoid datastore exceptions. Iterables is from Google collections. Query query = new Query(kind); query.setKeysOnly(); DatastoreService datastore = ... IterableEntity entityIterator = datastore.prepare(query).asIterable(); IterableKey keyIterator = Iterables.transform(entityIterator, new FunctionEntity, Key() { public Key apply(Entity arg0) { return arg0.getKey(); } }); IterableListKey partitioned = Iterables.partition(keyIterator, 100); for (ListKey sublist : partitioned) { datastore.delete(sublist); } On 22 Jan 2010, at 15:10, mete wrote: Suppose I have a class A and I have stored some instance of it in the datastore. Then I change it, but I keep the name. How I can delete all the previous data in the datastore, if I simply do a query and use deleteAll, it gives an error (I guess because I changed the name of some fields). Thank you. Mete -- 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 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.
Re: [appengine-java] Re: error is coming on appspot but local working fine
Strange that it would work locally. MultipartFile doesn't sound like something that is serializable. You'll want to store your data using the Blob class we provide, anyway. Are you storing this in the datastore or a session? You'll want to minimize the amount of data you store in a session. On Fri, Jan 22, 2010 at 4:07 AM, java rohit82.j...@gmail.com wrote: Hello This is my class file : mult package com.ei.server.web.fe; import java.util.Date; import java.util.Map; import org.springframework.web.multipart.MultipartFile; import com.ei.server.model.auth.IUser; import com.ei.server.model.auth.impl.User; public class ReviewFrmCmd { private String title; private Long category; private String review; private String tags; private Boolean recommend; private MapLong, String categories; private Date date; private IUser user; private Character status; private Long id; private Long rating; private MapInteger, String ratingCombo; private MultipartFile picture; private Long city; private String company; private String product; private Long companyId; private Long productId; private String cityName; private String catPraentName; private String catName; private byte[] pictureUploaded ; public byte[] getPictureUploaded() { return pictureUploaded; } public void setPictureUploaded(byte[] pictureUploaded) { this.pictureUploaded = pictureUploaded; } public String getCatPraentName() { return catPraentName; } public void setCatPraentName(String catPraentName) { this.catPraentName = catPraentName; } public String getCatName() { return catName; } public void setCatName(String catName) { this.catName = catName; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public void setDate(Date date) { this.date = date; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Long getCategory() { return category; } public void setCategory(Long category) { this.category = category; } public MapLong, String getCategories() { return categories; } public void setCategories(MapLong, String categories) { this.categories = categories; } public String getReview() { return review; } public void setReview(String review) { this.review = review; } public String getTags() { return tags; } public void setTags(String tags) { this.tags = tags; } public Date getDate() { return date; } public IUser getUser() { return user; } public void setUser(User user) { this.user = user; } public Character getStatus() { return status; } public void setStatus(Character status) { this.status = status; } public Long getRating() { return rating; } public void setRating(Long rating) { this.rating = rating; } public Boolean getRecommend() { return recommend; } public void setRecommend(Boolean recommend) { this.recommend = recommend; } public MapInteger, String getRatingCombo() { return ratingCombo; } public MultipartFile getPicture() { return picture; } public void setPicture(MultipartFile picture) { this.picture = picture; } public void setRatingCombo(MapInteger, String ratingCombo) { this.ratingCombo = ratingCombo; } public Long getCity() { return city; } public void setCity(Long city) { this.city = city; } public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } public String getProduct() { return product; } public void setProduct(String product) { this.product = product; } public Long getCompanyId() { return companyId; } public void setCompanyId(Long companyId) {
[appengine-java] Re: Ant and --enable_jar_splitting
bump; anyone? On 14 jan, 21:23, Marcel Overdijk marceloverd...@gmail.com wrote: target name=update description=Uploads the application to App Engine. appcfg action=update war=war options arg value=--enable_jar_splitting / /options /appcfg /target I'm using the target as above but I get message: Found a jar file too large to upload. Consider using --enable_jar_splitting. Did I specified something wrong in the above target to enable jar splitting? -- 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: deleting all entries in datastore
Yes it would be very nice to have GUI support for this. I will try the code John thank you. Mete On Jan 22, 8:47 pm, Locke locke2...@gmail.com wrote: It would be good to have the ability to do this from within the GUI. Other database management tools have empty table options, so a delete all of this Kind feature would be appropriate. On Jan 22, 12:59 pm, John Patterson jdpatter...@gmail.com wrote: Here is the code I use to delete one kind at a time - it batches the keys into Lists of 100 to avoid datastore exceptions. Iterables is from Google collections. Query query = new Query(kind); query.setKeysOnly(); DatastoreService datastore = ... IterableEntity entityIterator = datastore.prepare(query).asIterable(); IterableKey keyIterator = Iterables.transform(entityIterator, new FunctionEntity, Key() { public Key apply(Entity arg0) { return arg0.getKey(); } }); IterableListKey partitioned = Iterables.partition(keyIterator, 100); for (ListKey sublist : partitioned) { datastore.delete(sublist); } On 22 Jan 2010, at 15:10, mete wrote: Suppose I have a class A and I have stored some instance of it in the datastore. Then I change it, but I keep the name. How I can delete all the previous data in the datastore, if I simply do a query and use deleteAll, it gives an error (I guess because I changed the name of some fields). Thank you. Mete -- 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 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.
Re: [appengine-java] Re: One to many sample application needed on GWT
Can you post the code for your query? Child objects are lazily loaded, so if you close the Persistence Manager before retrieving them it will return an empty List. On Wed, Jan 20, 2010 at 4:34 PM, Dave ladjo...@gmail.com wrote: I had gotten my application to save data, but my queries are returning nothing. I see my data in both the parent and the child. I am getting a java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 error when I try to iterate through the child data. One of the strangest thing is that my primary Key value in the child table has a value of 1 for all the entities. This Key value should have been auto-generated by BigTable. Additionally, when I try to edit child I see something of the sort Decoded entity key: ParentDB: id=6 ChildDB: id=1 at the top of the page. Is this data at the top of the page telling me that I can retrieve both parent and child? On Jan 20, 4:50 pm, Ikai L (Google) ika...@google.com wrote: There should be plenty of examples around, but here is one from Max Ross's blog: http://gae-java-persistence.blogspot.com/2009/10/creating-bidrectiona... We're looking at expanding the capabilities of the App Engine Cookbook to support examples like this contributed by the community. On Tue, Jan 19, 2010 at 4:48 PM, Dave ladjo...@gmail.com wrote: I have been working assiduously on a GWT project. I have implemented the stockwatcher app without problems. It's new to me to be working with JDO/JPA. I'm more in tuned to using relational DB. There are no concrete application example that deals with one to many DB. I have read some of the documentation to create and use a one to many DB. I have been able to save the one to many data, but I'm unable to retrieve the data. I don't fully understand it all. Google should recognize that many people learn by doing. There needs to be a sample application with one to many relationships (and many to many). If Google's only tutorial on GWT was like what is shown here http://code.google.com/appengine/docs/java/datastore/relationships.html . Then less people would have used it. I know I'll learn how to implement one to many properly by 'googling' the Internet. However, it could have been less painful! Please post a sample application -- 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 google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%252bunsubscr...@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 -- 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 -- 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] authentication questions
Yes, that's possible. The Users Service is convenience, especially for those people using Google App Engine with a Google Apps Domain. You'll need to create your own User model and maintain the session state yourself, however. On Thu, Jan 21, 2010 at 5:36 AM, ale aleee...@gmail.com wrote: Hi, I'm a little confused about how can I authenticate on a application. I see and use the user service provide by app engine, and it is all ok. I would like to use the service of piacasaweb, youtube, google friend connect and other non google service like flickr (for example). For use that service the user have to authenticate again, using a custom login form of my application. Is this correct? I have understand right? Is possible to authenticate in different way? (for example only using the button of google friend connect... and not use at all the userservice of appengine)... Thanks, sorry for my bad english and for my big confusion... Bye Ale -- 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 -- 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: deleting all entries in datastore
+1 especially for large tables On Jan 22, 10:47 am, Locke locke2...@gmail.com wrote: It would be good to have the ability to do this from within the GUI. Other database management tools have empty table options, so a delete all of this Kind feature would be appropriate. On Jan 22, 12:59 pm, John Patterson jdpatter...@gmail.com wrote: Here is the code I use to delete one kind at a time - it batches the keys into Lists of 100 to avoid datastore exceptions. Iterables is from Google collections. Query query = new Query(kind); query.setKeysOnly(); DatastoreService datastore = ... IterableEntity entityIterator = datastore.prepare(query).asIterable(); IterableKey keyIterator = Iterables.transform(entityIterator, new FunctionEntity, Key() { public Key apply(Entity arg0) { return arg0.getKey(); } }); IterableListKey partitioned = Iterables.partition(keyIterator, 100); for (ListKey sublist : partitioned) { datastore.delete(sublist); } On 22 Jan 2010, at 15:10, mete wrote: Suppose I have a class A and I have stored some instance of it in the datastore. Then I change it, but I keep the name. How I can delete all the previous data in the datastore, if I simply do a query and use deleteAll, it gives an error (I guess because I changed the name of some fields). Thank you. Mete -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en .- 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=en.
[appengine-java] Program behaves erratically in Dev Environment but works correctly when executed in Google App Engine
I am quite new to App Engine development and JPA. I am running App Engine 1.2.6 and I use Eclipse. Here are three problems I've encountered that perplex me: 1. Servlet receives multiple instances of posts. I posted 30 distinct records using AJAX. In the Dev environment, my servlet receives 30 records, but a few of the records appear multiple times. So several distinct records never made it to my servlet (e.g., instead of records 1,2,3,4...30., I may get 4,4,4,4,4,4,7,8,9,10,12,12,12,29,30) This problem does not occur when I post these 30 records to the App Engine Production environment. Firebug confirmed that my javascript program posted 30 different records. Has anyone encountered this problem? Plus this javascript program had been tested against a PHP program before and the PHP program received the correct data. 2. java.lang.IllegalArgumentException: org.datanucleus.exceptions.NucleusUserException: Columns Columns [runWorkout_id, runWorkout_id, runWorkout_id] have been defined with 3 columns, yet there are only 1 to map to! 3. javax.persistence.PersistenceException: Detected attempt to establish RunWorkout(18580476422013912411-1263015546674)/ RunGeolocation(1676) as the parent of RunWorkout (18580476422013912411-1263015546674) but the entity identified by RunWorkout(18580476422013912411-1263015546674) has already been persisted without a parent. A parent cannot be established or changed once an object has been persisted. I get 2 and 3 in the Dev Environment every now and then during the posting of the 30 distinct records. I have 1-many relationship between two entities. My JPA code to add and update entities have not changed at all in the last few days. I can't replicate 2 and 3 in the past hour. But several hours ago, 2 and 3 appeared. Again, I have never seen these exceptions in the Production environment. Two days ago, 2 and 3 appeared too, but then disappeared. I don't understand 2 at all and I am confused as to how 3 could happen. Here's the snippet of my JPA code: EntityManager em = null; EntityTransaction tx = null; RunWorkout run; try { em=EMF.get().createEntityManager(); try { run = em.find(RunWorkout.class, RunWorkout.createKey(user.getUserId(), Long.toString (startTime))); tx=em.getTransaction(); tx.begin(); if (run == null) { em.persist(createRun(user)); } else { if ( distance run.getDistance()) { run.setDistance(distance); run.setDuration(duration); } run.getRunGeos().add(createGPSStat()); } tx.commit(); } Here are my classes: @Entity public class RunWorkout implements Workout{ private static final Logger log = Logger.getLogger (RunWorkout.class.getName()); @Id @Extension(vendorName = datanucleus, key=gae.encoded-pk, value=true) private String id; private String owner; private Date startTime; // UTC milliseconds private inttimeZone; private Float distance; // meters private Long duration; // milliseconds private String name; // name of Run Workout @OneToMany(cascade=CascadeType.ALL,mappedBy=runWorkout) @OrderBy(duration ASC) private ListRunGeolocation runGeos = new ArrayListRunGeolocation(); } @Entity public class RunGeolocation { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; // Geolocation API data private float latitude; private float longitude; private float accuracy; private float altitude; private float altitudeAccuracy; private float heading; private float speed; private long gpsTimestamp; // cumulative run statistics at current location private long duration; private float distance; @ManyToOne(fetch = FetchType.LAZY) private RunWorkout runWorkout; } Can someone point out what I did wrong or refer me to documentation that will give me my DOH! moment once I read (or reread) it? Thanks, Art -- 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: I get an InvocationTargetException the first time I query the datastore after a new JVM instance starts
I wish that were the case ... however GAE VFS does not function when hosted (but does locally) the only apparent difference is this exception ... On Jan 21, 8:18 pm, John Patterson jdpatter...@gmail.com wrote: These exceptions are a normal part of startup and logged at the INFO level for that reason. They are just slightly annoying but harmless so ignore them. On 22 Jan 2010, at 05:56, Larry Cable wrote: interestingly enough I get essentially the same exception when calling into the TaskQueue API ... I 01-21 02:44PM 41.437 com .google .appengine.repackaged.com.google.common.base.FinalizableReferenceQueue $SystemLoader loadFinalizer: Not allowed to access system class loader. I 01-21 02:44PM 41.455 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-21 02:44PM 41.459 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-6da5babfb78cdcdd (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.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest.init(TaskQueuePb.java:662) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest$1.init(TaskQueuePb.java:1402) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest.clinit(TaskQueuePb.java:1402) at com.google.appengine.api.labs.taskqueue.QueueImpl.createAddRequest (QueueImpl.java:168) at com.google.appengine.api.labs.taskqueue.QueueImpl.add (QueueImpl.java:233) at com.google.appengine.api.labs.taskqueue.QueueImpl.add (QueueImpl.java:225) at com .newatlanta .appengine.datastore.CachingDatastoreService.queueWatchDogTask (CachingDatastoreService.java:443) at com.newatlanta.appengine.datastore.CachingDatastoreService.clinit (CachingDatastoreService.java:139) at com.newatlanta.appengine.vfs.provider.GaeFileObject.clinit (GaeFileObject.java:61) at com.newatlanta.appengine.vfs.provider.GaeFileSystem.createFile (GaeFileSystem.java:47) at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile (AbstractFileSystem.java:343) at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile (AbstractFileSystem.java:314) at com.newatlanta.appengine.vfs.provider.GaeFileSystem.resolveFile (GaeFileSystem.java:55) at org .apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:86) at org .apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:66) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:692) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.resolveFile (GaeFileSystemManager.java:125) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:648) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:604) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.init (GaeFileSystemManager.java:90) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.init (GaeFileSystemManager.java:73) at com.newatlanta.appengine.vfs.provider.GaeVFS.getManager (GaeVFS.java:74) at com.newatlanta.appengine.vfs.provider.GaeVFS.resolveFile (GaeVFS.java:171) at com.newatlanta.appengine.nio.file.GaePath.init(GaePath.java:102) at com.newatlanta.appengine.nio.file.GaeFileSystem.getPath (GaeFileSystem.java:54) at com.newatlanta.repackaged.java.nio.file.Paths.get(Paths.java:70) at com.newatlanta.appengine.servlet.GaeVfsServlet.init (GaeVfsServlet.java:139) at javax.servlet.GenericServlet.init(GenericServlet.java:215) at
Re: [appengine-java] Re: App Engine cold starts and overly aggressive cycling
Hey everybody, I just wanted to give an update about this issue. We've changed resource allocation for our Java developers, which should result in much less app evictions. Some of you may have already noticed an improvement. I've already received several encouraging messages from developers who are experiencing less timeouts, less cold startups, and even one message about less Memcache evictions (though this may be one of those correlation != causation things)! While I'm fairly confident this change is beneficial to our developers, I'd like to ask for any updates from the community about how their applications are performing now. If your application is receiving one request an hour, you'll probably still be subject to evictions, but if you are getting a reasonable rate, you should be doing much better. Please take the time to report on this thread or directly to me if you like how your application is performing now. One more request: I'd like to ask those of you who have added cron pingers to remove them if it is feasible. The pingers have the unfortunate effect of skewing our instrumentation. If you're running a pinger, our measurements may indicate that your application is cycling at a healthy rate when it is clearly not. Thanks to all the developers that took the time to help me collect data. It really was a huge help! -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: App Engine cold starts and overly aggressive cycling
Ikai, Great news. I can report that I'm seeing FAR fewer cold starts today. So thank you! Would still love to see this implemented: http://code.google.com/p/googleappengine/issues/detail?id=2456 cheers -- James -- 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] One-to-many querying for a child instance
I have a one to many relationship. There is a problem in the way I query for a B object. I was wondering what is the best way (most efficient) to do that. A a = new A(A); B b = new B(B); a.getBs().add(b); pm.makePersistent(a); // it's done inside a transaction A ap = pm.getObjectById(A.class, A); // FINE B bp = pm.getObjectById(B.class, B); // NOT FOUND Exception I guess B is not found because the real key is not B but B + A key. How do you get the B object when you don't know nothing about A? public class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String key; @Persistent @Extension(vendorName = datanucleus, key = gae.pk-name, value = true) private String name; @Persistent(mappedBy = a) private ListB bs; public A(String name) { this.name = name; bs = new ArrayListB(); } ... Getter/Setter } @PersistenceCapable(identityType = javax.jdo.annotations.IdentityType.APPLICATION) public class B { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String key; @Persistent @Extension(vendorName = datanucleus, key = gae.pk-name, value = true) private String name; @Persistent private A a; public B(String name) { this.name = name; } ... Getter/Setter } -- 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: deleting all entries in datastore
I have found deleting to be the most CPU hungry activity - more than putting the data in the first place. Using code similar to below I have used over an hour of CPU time in one 30 second request! So I wonder if that is why this option doesn't exist in the GUI... people would be gutted to hit their quota just from deleting a kind. But if it did not count towards the quota that would be fantastic. In the same way that creating indexes is free CPU time as long as you do it after entering your data. On 23 Jan 2010, at 03:30, Larry Cable wrote: +1 especially for large tables On Jan 22, 10:47 am, Locke locke2...@gmail.com wrote: It would be good to have the ability to do this from within the GUI. Other database management tools have empty table options, so a delete all of this Kind feature would be appropriate. On Jan 22, 12:59 pm, John Patterson jdpatter...@gmail.com wrote: Here is the code I use to delete one kind at a time - it batches the keys into Lists of 100 to avoid datastore exceptions. Iterables is from Google collections. Query query = new Query(kind); query.setKeysOnly(); DatastoreService datastore = ... IterableEntity entityIterator = datastore.prepare(query).asIterable(); IterableKey keyIterator = Iterables.transform(entityIterator, new FunctionEntity, Key() { public Key apply(Entity arg0) { return arg0.getKey(); } }); IterableListKey partitioned = Iterables.partition(keyIterator, 100); for (ListKey sublist : partitioned) { datastore.delete(sublist); } On 22 Jan 2010, at 15:10, mete wrote: Suppose I have a class A and I have stored some instance of it in the datastore. Then I change it, but I keep the name. How I can delete all the previous data in the datastore, if I simply do a query and use deleteAll, it gives an error (I guess because I changed the name of some fields). Thank you. Mete -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en .- 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-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.
Re: [appengine-java] One-to-many querying for a child instance
Execute a query on the name property of B rather than loading it by key. If the name is unique the result should only contain one B. On 23 Jan 2010, at 11:41, Sydney wrote: I have a one to many relationship. There is a problem in the way I query for a B object. I was wondering what is the best way (most efficient) to do that. A a = new A(A); B b = new B(B); a.getBs().add(b); pm.makePersistent(a); // it's done inside a transaction A ap = pm.getObjectById(A.class, A); // FINE B bp = pm.getObjectById(B.class, B); // NOT FOUND Exception I guess B is not found because the real key is not B but B + A key. How do you get the B object when you don't know nothing about A? public class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String key; @Persistent @Extension(vendorName = datanucleus, key = gae.pk-name, value = true) private String name; @Persistent(mappedBy = a) private ListB bs; public A(String name) { this.name = name; bs = new ArrayListB(); } ... Getter/Setter } @PersistenceCapable(identityType = javax.jdo.annotations.IdentityType.APPLICATION) public class B { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String key; @Persistent @Extension(vendorName = datanucleus, key = gae.pk-name, value = true) private String name; @Persistent private A a; public B(String name) { this.name = name; } ... Getter/Setter } -- 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] appcfg.py download_data and Java owned relationships
I would like to use appcfg.py download_data to export my entities in csv format and maintain the owned relationships between entities (one-to-many in this case). I am getting the entity key as a field in the csv, but I've looked around a bit and haven't found how to decode it. Can it be decoded after download? Or do I have to configure the exporter to decode it for me? Can someone point me to an example for how to do this? Thanks, Brian -- 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] generating sequential ids
Hi, I have an Employee class public class Employee { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName=datanucleus, key=gae.encoded-pk, value=true) private String id; @Persistent private String department; @Persistent private String firstName; @Persistent private String lastName; } Now, I want to provide a EmployeeID to the employee. I will not be able to provide gae.encoded-pk value as this is long and not meaningful. Further, I want to provide the EmployeeID with department as the prefix. How can I generate the EmployeeID, similar to sequence in the relational world. -Aswath -- 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] upload document with gdata
Hello, Anyone has uploaded a document to google docs (gdata) with a servlet? anyone has an example of source 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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.