[appengine-java] write a file on server side
Hi, I want to write some output to a text file on server side and I don't think database (JDO) is necessary for my application. Is there any way to do that? Because google engine does not support the standard java I/ O, i.e. PrintWriter. 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: Local Persistance of Data
Is it related to ur FIle Upload. are you trying to upload a file??? There is some config you wil have to take care for upload functionality of Strut2 and GAE . Check this link, hope it might be of some help http://whyjava.wordpress.com/2009/10/04/file-upload-on-google-app-engine-using-struts2/ Regards Prateek On Jun 27, 1:56 am, lisandrodc lisandr...@gmail.com wrote: I have a next exception in console, I use Struts 2 v2.1.8: 26/06/2010 20:48:56 com.google.appengine.tools.development.AbstractContainerService loadPropertiesFile ADVERTENCIA: Unable to load properties file, D:\eclipse2\PruebaProde \PruabProd\war java.io.FileNotFoundException: D:\eclipse2\PruebaProde\PruabProd\war (Acceso denegado) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at com.google.appengine.tools.development.AbstractContainerService.loadPropert iesFile(AbstractContainerService.java: 394) at com.google.appengine.tools.development.AbstractContainerService.updateLoggi ngConfiguration(AbstractContainerService.java: 350) at com.google.appengine.tools.development.AbstractContainerService.loadAppEngi neWebXml(AbstractContainerService.java: 240) at com.google.appengine.tools.development.AbstractContainerService.startup(Abs tractContainerService.java: 144) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerI mpl.java: 222) at com.google.appengine.tools.development.DevAppServerMain $StartAction.apply(DevAppServerMain.java:171) at com.google.appengine.tools.util.Parser $ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.init(DevAppServer Main.java: 120) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMa in.java: 96) 26/06/2010 20:48:56 com.google.apphosting.utils.jetty.JettyLogger info INFO: jetty-6.1.x 26/06/2010 20:48:57 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info INFO: Parsing configuration file [struts-default.xml] 26/06/2010 20:48:57 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info INFO: Unable to locate configuration files of the name struts- plugin.xml, skipping 26/06/2010 20:48:57 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info INFO: Parsing configuration file [struts-plugin.xml] 26/06/2010 20:48:57 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info INFO: Parsing configuration file [struts.xml] 26/06/2010 20:48:57 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info INFO: Overriding property struts.i18n.reload - old value: false new value: true 26/06/2010 20:48:57 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info INFO: Overriding property struts.configuration.xml.reload - old value: false new value: true 26/06/2010 20:48:58 com.google.apphosting.utils.jetty.JettyLogger info INFO: Started selectchannelconnec...@127.0.0.1: 26/06/2010 20:48:58 com.google.appengine.tools.development.DevAppServerImpl start INFO: The server is running athttp://localhost:/ On 25 jun, 18:47, lisandrodc lisandr...@gmail.com wrote: Thanks Prateek! The struts version that tape-worm was old (2.1.2). The problem was solved by the version 2.1.8!!! Regards! Lisandro On 25 jun, 03:07, Prateek bittooagar...@gmail.com wrote: Which URL are you trying to access??? http://localhost:/_ah/admin OR http://localhost:/_ah/login I guesshttp://localhost:/_ah/adminshouldworkfine. Can you even validate the struts2 jar version. Is it 2.1.8.1 Regards Prateek On Jun 25, 3:02 am, lisandrodc lisandr...@gmail.com wrote: Hi Prateek. First thanks, but I don´t solve my local data problem. Now, my struts.xml is: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.devMode value=true / include file=struts-default.xml/include constant name=struts.action.excludePattern value='/_ah/.*'/ package name=member namespace=/member extends=struts-default action name=login result/pages/inicio.jsp/result /action action name=NuevoEmpleado class=struts.action.Default result/pages/alta.jsp/result /action action name=RegistrarEmpleado class=struts.action.RegistrarEmpleado result/pages/alta_exitosa.jsp/result /action action name=home method=login class=com.login.LoginAction result/pages/home.jsp/result result
[appengine-java] Re: JDO delete objects
Thanks. I've tried it but it is pretty slow if I have to control it this way. The problem I met is when I create an object and its ID is, say 1, if I run my application again, the ID becomes 2. How can I let my application have refreshed new database everytime? Because if it keeps adding the objects, it will exceed the quota anyway, isn't it? Here is my code. Everytime I run my application, 'id' will increment by 1. PersistenceManager pm = PMF.get().getPersistenceManager(); String title = welcome; document doc = new document(title); try{ pm.makePersistent(doc); System.out.println(id is +doc.getID()); }finally{ pm.close(); } On Jun 29, 1:35 pm, Didier Durand durand.did...@gmail.com wrote: Hi Lu, You can see the content of the database and delete it all from the App Engine Console https://appengine.google.com/dashboard?app_id=yourappid[Adapt yourappid to yours] and then go to Datastore Viewer or Datastore Statistics regards didier On Jun 28, 4:56 pm, Lu chenglu.annal...@gmail.com wrote: Hi, How can I delete all the objects existed in the database? That means I want my application to have a empty database everytime when it gets started. Is there anywhere actually we can see the content of the database? Thanks- 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] Re: Limiting the number of requests per IP each minute
Ignoring the GAE-side of the question, how are you planning on handling people who are behind proxies and routers? Multiple people will all look like they are coming from the same IP address - maybe this isn't an issue for you! From a GAE perspective you might want to do some reading around sharding counters. e.g. http://code.google.com/appengine/articles/sharding_counters.html On Jun 28, 12:17 pm, mscwd01 mscw...@gmail.com wrote: I assume my idea was the best anyone can come up with? On Jun 27, 10:27 am, mscwd01 mscw...@gmail.com wrote: Hey, I am developing an app which awards users for visiting a specific link. However, I want to ensure this is not abused by people writing scripts to visit the link rather than manually viewing it. Is there a way to check how many times a specific IP address has accessed your application within the last minute and deny access if the visit count is higher than, say, 20. I guess I could use the memcache to insert the users IP (if they have not visited before), then on each subsequent visit check if the IP exists and if so increment the visit count. However, will this work if you have thousands of concurrent users? Is there a better way? Many thanks- 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] Re: Application restart for almost every request? What happened?
You probably want to have a read of the following FAQ - http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request On Jun 29, 4:13 am, opok vir...@gmail.com wrote: Error Message: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. My App just read a cache string with small size (if not exist query from database) and then output the response, why it always turns out that it need to restart the whole application? It happens in 95% of incoming requests. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: JDO delete objects
Hi Lu, One way is for your app to create a task on the task queue at start- up. This task can iterate through your existing document instances in the datastore and delete them. (For robustness, you could fetch a few instances only, and if more exist then get the task to create a new task to continue the work.) If this deletion would interfere with instances newly-created, you could introduce a start-up date-time to the task, so that you query for document instances older than that (you might have to add a date- time field to your document class and set it at creation-time (and possibly edit-time too)). Enjoy? On Jun 29, 8:44 am, Lu chenglu.annal...@gmail.com wrote: Thanks. I've tried it but it is pretty slow if I have to control it this way. The problem I met is when I create an object and its ID is, say 1, if I run my application again, the ID becomes 2. How can I let my application have refreshed new database everytime? Because if it keeps adding the objects, it will exceed the quota anyway, isn't it? Here is my code. Everytime I run my application, 'id' will increment by 1. PersistenceManager pm = PMF.get().getPersistenceManager(); String title = welcome; document doc = new document(title); try{ pm.makePersistent(doc); System.out.println(id is +doc.getID()); }finally{ pm.close(); } -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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: write a file on server side
Hi Lu, One cannot write to file server-side using GAE/J! For guaranteed server-side persistence, one must use the Google BigTable datastore. If you want, you could write to log, and then extract log entries to your local PC using the relevant GAE/J tool, but I personally would not want to use logs as a persistent data store. Cheers, Ian On Jun 29, 7:10 am, Lu chenglu.annal...@gmail.com wrote: Hi, I want to write some output to a text file on server side and I don't think database (JDO) is necessary for my application. Is there any way to do that? Because google engine does not support the standard java I/ O, i.e. PrintWriter. 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: Application restart for almost every request? What happened?
Hey, Actually, what you probably want to do is star this issue: http://code.google.com/p/googleappengine/issues/detail?id=2931 It's been happening for awhile now, but generally only to low-traffic users, so it hasn't gotten much attention. Creeping up in the list, though! Jake On Jun 29, 4:44 am, Simon qila...@gmail.com wrote: You probably want to have a read of the following FAQ -http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request On Jun 29, 4:13 am, opok vir...@gmail.com wrote: Error Message: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. My App just read a cache string with small size (if not exist query from database) and then output the response, why it always turns out that it need to restart the whole application? It happens in 95% of incoming requests. -- 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: Application restart for almost every request? What happened?
OK, I did that. But is there any workaround or some other way to avoid this, I am sure that my app is run with low resource requirement, it indeed have no reason to restart, but currently it restarts almost in every incoming request! On 6月29日, 下午8时05分, Jake jbrooko...@cast.org wrote: Hey, Actually, what you probably want to do is star this issue:http://code.google.com/p/googleappengine/issues/detail?id=2931 It's been happening for awhile now, but generally only to low-traffic users, so it hasn't gotten much attention. Creeping up in the list, though! Jake On Jun 29, 4:44 am, Simon qila...@gmail.com wrote: You probably want to have a read of the following FAQ -http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request On Jun 29, 4:13 am, opok vir...@gmail.com wrote: Error Message: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. My App just read a cache string with small size (if not exist query from database) and then output the response, why it always turns out that it need to restart the whole application? It happens in 95% of incoming requests. -- 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: Application restart for almost every request? What happened?
There is no real workaround, since they are cycling your application out since it's getting such low traffic as explained in the FAQ. The best you can do is minimise the loading time, by removing dependencies on complicated frameworks and using lazy initialisation. As soon as your application starts getting a more consistent amount of traffic the problem will be minimised, although you will still get some loading requests as the GAE backend potentially load balances your application. On Jun 29, 1:14 pm, opok vir...@gmail.com wrote: OK, I did that. But is there any workaround or some other way to avoid this, I am sure that my app is run with low resource requirement, it indeed have no reason to restart, but currently it restarts almost in every incoming request! On 6月29日, 下午8时05分, Jake jbrooko...@cast.org wrote: Hey, Actually, what you probably want to do is star this issue:http://code.google.com/p/googleappengine/issues/detail?id=2931 It's been happening for awhile now, but generally only to low-traffic users, so it hasn't gotten much attention. Creeping up in the list, though! Jake On Jun 29, 4:44 am, Simon qila...@gmail.com wrote: You probably want to have a read of the following FAQ -http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request On Jun 29, 4:13 am, opok vir...@gmail.com wrote: Error Message: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. My App just read a cache string with small size (if not exist query from database) and then output the response, why it always turns out that it need to restart the whole application? It happens in 95% of incoming requests.- 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] Re: JDO delete objects
Yes, thanks. That's cool. But why the key will keep incrementing by 1? If modifying this link https://appengine.google.com/dashboard?app_id=yourappid, I can delete the entities manually. It seems like the data shown in 'datastore viewer' is inconsistent with the data shown under the runtime condition. On Jun 29, 6:53 pm, Ian Marshall ianmarshall...@gmail.com wrote: Hi Lu, One way is for your app to create a task on the task queue at start- up. This task can iterate through your existing document instances in the datastore and delete them. (For robustness, you could fetch a few instances only, and if more exist then get the task to create a new task to continue the work.) If this deletion would interfere with instances newly-created, you could introduce a start-up date-time to the task, so that you query for document instances older than that (you might have to add a date- time field to your document class and set it at creation-time (and possibly edit-time too)). Enjoy? On Jun 29, 8:44 am, Lu chenglu.annal...@gmail.com wrote: Thanks. I've tried it but it is pretty slow if I have to control it this way. The problem I met is when I create an object and its ID is, say 1, if I run my application again, the ID becomes 2. How can I let my application have refreshed new database everytime? Because if it keeps adding the objects, it will exceed the quota anyway, isn't it? Here is my code. Everytime I run my application, 'id' will increment by 1. PersistenceManager pm = PMF.get().getPersistenceManager(); String title = welcome; document doc = new document(title); try{ pm.makePersistent(doc); System.out.println(id is +doc.getID()); }finally{ pm.close(); }- 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] Re: JDO delete objects
(Of course, all this discussion is about the datastore in the GAE cloud, not a local one kept by the dev app server.) But why the key will keep incrementing by 1? This depends on how you have defined your persistent entity class. I have no preference for my key values, I just want them to be unique, so I let the datastore generate them at first persistence-time. I use encoded key strings with a Long ID extract. The IDs tend to increase for new instances, but I have seen no guarantee for this. This should not matter anyway(?). It seems like the data shown in 'datastore viewer' is inconsistent -- with the data shown under the runtime condition. What do you mean by this? (There can be small delays between persisting your data and it showing up on the data viewer.) -- 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: Jetty reload and scanIntervalSeconds?
You can use Jrebel with GAE: http://www.zeroturnaround.com/jrebel/ You will have to combine both instrumentation agents in the launcher, but it works fine. On Jun 27, 6:22 pm, Rob Roland rob.rol...@gmail.com wrote: Hi all, If you've used Jetty via Maven before, you've probably used the reload and scanIntervalSeconds configuration options. Is there a way to do this with the local DevAppServerMain? It's really helpful to be able to modify your HTML and have it visible immediately within your dev environment. Thanks, Rob -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Google Plugin for Eclipse 3.6 is now available
Just to Add to Arian's post. I has all sorts of trouble installing the new plugin for eclipse Helios. I did it through the update site and the marketplace says it's installed, but i don't have any of the google options i'm used to. If this helps - i tried this with Eclipse Helios EE x64 and x86, and Eclipse Helios for Java x64 and x86. And tried on two different workstations. Both we're running windows 7 64 bit. Anyone else? On Jun 25, 11:21 am, Arian aerobo...@gmail.com wrote: On Jun 23, 11:14 pm, Jason Parekh jasonpar...@gmail.com wrote: Hey folks, Google Plugin for Eclipse 1.3.3 is out with support for Eclipse 3.6. Install it with Eclipse 3.6's new Eclipse Marketplace feature by going to Help Eclipse Marketplace, and search for Google Plugin for Eclipse. Alternatively, here are the update sites: - Eclipse Helios (3.6):http://dl.google.com/eclipse/plugin/3.6 - Eclipse Galileo (3.5):http://dl.google.com/eclipse/plugin/3.5 - Eclipse Ganymede (3.4):http://dl.google.com/eclipse/plugin/3.4 - Eclipse Europa (3.3):http://dl.google.com/eclipse/plugin/3.3 Need detailed instructions? Check out the quick start guide:http://code.google.com/eclipse/docs/getting_started.html Enjoy! I installed the plugin on Helios, but I don't see the project templates, nor the deploy button, nor any button or function related to Google web toolkit and appengine.. it seems like it fails to load the plugin or something :( -- 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: Application restart for almost every request? What happened?
This is really one of the core problems why you cannot use GAE for anything serious. Even if you get enough traffic, some users suffer from instance recycling every second (read the comments at the issue). -- 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: Limiting the number of requests per IP each minute
It's funny, i can't think of a better way to stop the abuse but i can think of a 100 ways to abuse it. I hate getting stuck in one of those spy vs spy - measure vs counter measure situations so i'm sympathetic to the challenge. Maybe you could randomly redirect a user to one of those prove your human by entering these garbled looking words that only a human can read tests. Like, one in every 100 clicks or so a user gets a random test they have to prove they are human before continuing on. Anyway, that's my 12:30 am $0.02. good luck. - Ben On Jun 28, 7:17 am, mscwd01 mscw...@gmail.com wrote: I assume my idea was the best anyone can come up with? On Jun 27, 10:27 am, mscwd01 mscw...@gmail.com wrote: Hey, I am developing an app which awards users for visiting a specific link. However, I want to ensure this is not abused by people writing scripts to visit the link rather than manually viewing it. Is there a way to check how many times a specific IP address has accessed your application within the last minute and deny access if the visit count is higher than, say, 20. I guess I could use the memcache to insert the users IP (if they have not visited before), then on each subsequent visit check if the IP exists and if so increment the visit count. However, will this work if you have thousands of concurrent users? Is there a better way? Many 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] Haunted Guestbook Tutorial
Before I describe my question let me briefly introduce my environment. I use Windows XP, Chrome, and Apache Ant. This is what happened: Everything went pretty well. I had my first hello world response as expected. Then I met a problem I don't know how or why it happens. In a step this tutorial says Using the Users Service. I copied the code showed on the page into GuestbookServlet.java, saved and closed the file. http://code.google.com/appengine/docs/java/gettingstarted/usingusers.html I followed the description If you are using Ant, you must stop the server and rebuild the project to see changes made to source code. Stop server in here means Hit Control-C. I am not sure about rebuild the project part. I thought it is the changing code part as I did before. By compeleted this description I excute ant runserver again. Guess what happened? I saw hello world mysteriously appeared again. Which can't be found in any part of the current source code but previous one. I tried to delete .class file, clean browser cache or run ant several times but all in vain. Finally I gave up, reboot my laptop...and it works 100% normally after. At last I saw hello t...@email message. This makes me feel really creepy. Does anyone know what's going on? Also I don't like to reboot my laptop everytime I changed code I believe there must be a better way to handle this situation. -- 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] Haunted Guestbook Tutorial
First off, BEST. SUBJECT. EVER. Can you see if the server was actually killed in the process manager? You shouldn't be able to rebuild the project since there will be a port conflict, but it's worth looking at. Also, is there a reason you're using Ant and not the Eclipse plugin? That could make your life easier in the short term until you get used to the environment. On Tue, Jun 29, 2010 at 7:20 AM, kiraice exkill...@gmail.com wrote: Before I describe my question let me briefly introduce my environment. I use Windows XP, Chrome, and Apache Ant. This is what happened: Everything went pretty well. I had my first hello world response as expected. Then I met a problem I don't know how or why it happens. In a step this tutorial says Using the Users Service. I copied the code showed on the page into GuestbookServlet.java, saved and closed the file. http://code.google.com/appengine/docs/java/gettingstarted/usingusers.html I followed the description If you are using Ant, you must stop the server and rebuild the project to see changes made to source code. Stop server in here means Hit Control-C. I am not sure about rebuild the project part. I thought it is the changing code part as I did before. By compeleted this description I excute ant runserver again. Guess what happened? I saw hello world mysteriously appeared again. Which can't be found in any part of the current source code but previous one. I tried to delete .class file, clean browser cache or run ant several times but all in vain. Finally I gave up, reboot my laptop...and it works 100% normally after. At last I saw hello t...@email message. This makes me feel really creepy. Does anyone know what's going on? Also I don't like to reboot my laptop everytime I changed code I believe there must be a better way to handle this situation. -- 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 Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Google Plugin for Eclipse 3.6 is now available
Benjamin and Arian, Your issues sound very similar to http://code.google.com/p/google-web-toolkit/issues/detail?id=4168 , could you try running as Administrator to see if the issue disappears? jason On Tue, Jun 29, 2010 at 12:27 AM, Benjamin bsaut...@gmail.com wrote: Just to Add to Arian's post. I has all sorts of trouble installing the new plugin for eclipse Helios. I did it through the update site and the marketplace says it's installed, but i don't have any of the google options i'm used to. If this helps - i tried this with Eclipse Helios EE x64 and x86, and Eclipse Helios for Java x64 and x86. And tried on two different workstations. Both we're running windows 7 64 bit. Anyone else? On Jun 25, 11:21 am, Arian aerobo...@gmail.com wrote: On Jun 23, 11:14 pm, Jason Parekh jasonpar...@gmail.com wrote: Hey folks, Google Plugin for Eclipse 1.3.3 is out with support for Eclipse 3.6. Install it with Eclipse 3.6's new Eclipse Marketplace feature by going to Help Eclipse Marketplace, and search for Google Plugin for Eclipse. Alternatively, here are the update sites: - Eclipse Helios (3.6):http://dl.google.com/eclipse/plugin/3.6 - Eclipse Galileo (3.5):http://dl.google.com/eclipse/plugin/3.5 - Eclipse Ganymede (3.4):http://dl.google.com/eclipse/plugin/3.4 - Eclipse Europa (3.3):http://dl.google.com/eclipse/plugin/3.3 Need detailed instructions? Check out the quick start guide: http://code.google.com/eclipse/docs/getting_started.html Enjoy! I installed the plugin on Helios, but I don't see the project templates, nor the deploy button, nor any button or function related to Google web toolkit and appengine.. it seems like it fails to load the plugin or something :( -- 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: Any ETA for a backup/restore facility?
The bulk loader does indeed provide backup and restore functionality today. While the implementation is in Python it can talk to your Java server and the entities are shared between Java and Python. On Jun 28, 4:46 pm, mscwd01 mscw...@gmail.com wrote: Thanks for your replying guys, it would be great if we could get an official Google response to update us on this as well though! I'll definitely have a look at the Bulk Loader in the meantime... On Jun 28, 1:52 pm, Mike Dillon mikedillo...@gmail.com wrote: Mscwd01, I'm not a google employee, but I have had success backing up our datastore and then restoring our datastore with the bulkloader utility. Currently the bulkloader is in the python sdk, so all you need to do is download that and then youll be able to do backups and restore from those backups. Check out the literature on the app engine, and try a couple searches to get your bearings. Nick Johnson has commented or written every search result that comes back when I was researching this a couple of weeks back, and there is also an I/O video on the bulkloader. Make sure you read some of the fine print, i.e. one caveat is that you must have had your datastore populated for at least 12 hours which is the amount of time it takes for the statistics info to be built. That what the bulkloader works off of to do its datastore dump. - Mike On Jun 28, 7:16 am, mscwd01 mscw...@gmail.com wrote: Hey Google Employees, There has been a backup/restore facility on the roadmap for a while now. Can you let us know if and when we may get an in-built tool that will allow us to easily save the contents of the datastore to our local machines and restore it if needs be? In the meantime, what is the preferred solution to backup/restore our Java based apps? 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: JDO/JPA Snippets That Work - Creating a bidirectional, owned, one-to-many relationship
I'd love to see Max Ross continue on these posts. I've burned about 4 hrs now trying to get JDO owned, bidirectional relationships working. It seems like every issue I fix, another pops up. Whack a mole... I'm experiencing everything from: - Child entities persisting, but not subsequently loading (even with fetch groups, fetch depths) - Bidirectional reference being lost on detachCopy - Reconnecting a detached object throwing random errors in the ArrayList wrapper I'm tired of feeling my way around in the dark and would LOVE a full example (CRUD, including detached entities). Barring that, Twig, here I come. Frustrated, James Max Ross: Hello hello and welcome to the very first installment of JDO/JPA Snippets That Work! Creating A Bidrectional Owned One-To-Many Suppose you're building a book catalog application and you want to model books and chapters. Books contain chapters. A chapter cannot exist without a book, so if you delete a book you want its chapters automatically deleted along with it. You also want to each chapter to have a reference to the book that owns it. Sounds like a bidrectional, owned, one-to-many relationship is just the thing. First we'll set up our model objects and then we'll add some code to create a Book with 2 Chapters. JPA: @Entity public class Book { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Key id; private String title; @OneToMany(mappedBy = book, cascade = CascadeType.ALL) private ListChapter chapters = new ArrayListChapter(); // getters and setters } @Entity public class Chapter { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Key id; private String title; private int numPages; @ManyToOne(fetch = FetchType.LAZY) private Book book; // getters and setters } Now let's create a book with two chapters (we'll assume someone else is creating and closing an EntityManager named 'em' for us): Book b = new Book(); b.setTitle(JPA 4eva); Chapter c1 = new Chapter(); c1.setTitle(Intro); c1.setNumPages(10); b.getChapters().add(c1); Chapter c2 = new Chapter(); c2.setTitle(Configuration); c2.setNumPages(9); b.getChapters().add(c2); em.getTransaction().begin(); try { em.persist(b); em.getTransaction().commit(); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } } JDO: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) public class Book { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private String title; @Persistent(mappedBy = book) @Element(dependent = true) private ListChapter chapters = new ArrayListChapter(); // getters and setters } @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) public class Chapter { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private String title; private int numPages; @Persistent private Book book; // getters and setters } Now let's create a book with two chapters (we'll assume someone else is creating and closing a PersistenceManager named 'pm' for us): Book b = new Book(); b.setTitle(JDO 4eva); Chapter c1 = new Chapter(); c1.setTitle(Intro); c1.setNumPages(10); b.getChapters().add(c1); Chapter c2 = new Chapter(); c2.setTitle(Configuration); c2.setNumPages(9); b.getChapters().add(c2); pm.currentTransaction().begin(); try { pm.makePersistent(b); pm.currentTransaction().commit(); } finally { if (pm.currentTransaction().isActive()) { pm.currentTransaction().rollback(); } -- 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: Google Plugin for Eclipse 3.6 is now available
When I tried installing from the Marketplace on Eclipse Helios EE x64 for Mac OS X, Eclipse crashed each time it would start up (right when it tried to load the GEP). I had to manually remove the plugin to get Eclipse to start up. After uninstalling (it was already gone) the Marketplace version, I tried installing from the update site and got it working. -- Arthur Kalmenson On Tue, Jun 29, 2010 at 12:27 AM, Benjamin bsaut...@gmail.com wrote: Just to Add to Arian's post. I has all sorts of trouble installing the new plugin for eclipse Helios. I did it through the update site and the marketplace says it's installed, but i don't have any of the google options i'm used to. If this helps - i tried this with Eclipse Helios EE x64 and x86, and Eclipse Helios for Java x64 and x86. And tried on two different workstations. Both we're running windows 7 64 bit. Anyone else? On Jun 25, 11:21 am, Arian aerobo...@gmail.com wrote: On Jun 23, 11:14 pm, Jason Parekh jasonpar...@gmail.com wrote: Hey folks, Google Plugin for Eclipse 1.3.3 is out with support for Eclipse 3.6. Install it with Eclipse 3.6's new Eclipse Marketplace feature by going to Help Eclipse Marketplace, and search for Google Plugin for Eclipse. Alternatively, here are the update sites: - Eclipse Helios (3.6):http://dl.google.com/eclipse/plugin/3.6 - Eclipse Galileo (3.5):http://dl.google.com/eclipse/plugin/3.5 - Eclipse Ganymede (3.4):http://dl.google.com/eclipse/plugin/3.4 - Eclipse Europa (3.3):http://dl.google.com/eclipse/plugin/3.3 Need detailed instructions? Check out the quick start guide:http://code.google.com/eclipse/docs/getting_started.html Enjoy! I installed the plugin on Helios, but I don't see the project templates, nor the deploy button, nor any button or function related to Google web toolkit and appengine.. it seems like it fails to load the plugin or something :( -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: AppEngineConfigException: XML error validating on Uploading files using Deploy App Enginer Project
Could you please look into my request, where Ikai Lan asked me to provide XML files which are as follows Thanks Nick On Jun 17, 10:59 pm, Nick lgfr...@gmail.com wrote: Hi, Thanks for your reply. Please note web.xlm as follows ?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; xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 servletservlet-nameLGDesign/servlet-name servlet-classcom.lgframe.design.LGDesignServlet/servlet-class/ servlet servlet-mapping servlet-nameLGDesign/servlet-name url-pattern/lgdesign/url-pattern/servlet-mapping servletservlet-nameSafetyFactor/servlet-name servlet-classcom.lgframe.design.safety_factor_servlet/ servlet-class/servlet servlet-mapping servlet-nameSafetyFactor/servlet-name url-pattern/safetyfactor/url-pattern/servlet-mapping servletservlet-nameScrewCapacity/servlet-name servlet-classcom.lgframe.design.screw_cap_servlet/servlet- class/servlet servlet-mapping servlet-nameScrewCapacity/servlet-name url-pattern/screwcapacity/url-pattern/servlet-mapping servletservlet-nameShearCapacity/servlet-name servlet-classcom.lgframe.design.shear_cap_servlet/servlet- class/servlet servlet-mapping servlet-nameShearCapacity/servlet-name url-pattern/shearcapacity/url-pattern/servlet-mapping servletservlet-nameWebCripplingCapacity/servlet-name servlet-classcom.lgframe.design.web_crippling_servlet/ servlet-class/servlet servlet-mapping servlet-nameWebCripplingCapacity/servlet-name url-pattern/webcripplingcapacity/url-pattern/servlet- mapping servletservlet-nameIBC-200 Wind Load/servlet-name servlet-classcom.lgframe.design.ibc_wind_load_servlet/ servlet-class/servlet servlet-mapping servlet-nameIBC-200 Wind Load/servlet-name url-pattern/ibc2000windload/url-pattern/servlet-mapping servletservlet-nameWindLoadCompAndCladding/servlet-name servlet-classcom.lgframe.design.wind_load_boca_comp_clad/ servlet-class/servlet servlet-mapping servlet-nameWindLoadCompAndCladding/servlet-name url-pattern/windloadcompandcladding/url-pattern/servlet- mapping servletservlet-nameIBC200SecimicLoad/servlet-name servlet-classcom.lgframe.design.ibc_seismic_load_servlet/ servlet-class/servlet servlet-mapping servlet-nameIBC200SecimicLoad/servlet-name url-pattern/ibc200secimicload/url-pattern/servlet- mapping servletservlet-nameC_Stud_Section_Prop/servlet-name servlet-classcom.lgframe.design.C_Stud_Sec_Prop_Servlet/ servlet-class/servlet servlet-mapping servlet-nameC_Stud_Section_Prop/servlet-name url-pattern/c_stud_section_prop/url-pattern/servlet- mapping servletservlet-nameC_Stud_Design_CombineAxialBending/servlet- name servlet- classcom.lgframe.design.C_Stud_Comb_Axial_Bend_Servlet/servlet- class/servlet servlet-mapping servlet-nameC_Stud_Design_CombineAxialBending/servlet-name url-pattern/axialbending/url-pattern/servlet-mapping welcome-file-list welcome-filelgdesign_index.html/welcome-file /welcome-file-list /web-app And, file appengine-web.xml file as follows ?xml version=1.0 encoding=utf-8? appengine-web-app xmlns=http://appengine.google.com/ns/1.0; applicationwebsteeldesign/application version1/version !-- Configure java.util.logging -- system-properties property name=java.util.logging.config.file value=WEB-INF/ logging.properties/ /system-properties system-properties property name=com.google.gdata.DisableCookieHandler value=true/ /system-properties sessions-enabledtrue/sessions-enabled /appengine-web-app Thanks On Jun 17, 2:13 pm, Ikai L (Google) ika...@google.com wrote: Can you post your XML file? On Wed, Jun 16, 2010 at 3:20 PM, Nick lgfr...@gmail.com wrote: Hi, What steps will reproduce the problem? 1. On my local machine, I have a text ssma_stud.txt under folder WEB-INF/ ssma_std.txt. I read this text file, validate data. Its working fine. 2. After successful testing on local machine, while deploying it using Deploy App Enginer Project , plug-in on eclipse, I got following error What is the expected output? What do you see instead? Here is the error logs... com.google.apphosting.utils.config.AppEngineConfigException: XML error validating C:\NC\Eclipse_Proj\LGDesign\war\WEB-INF\appengine-web.xml against
[appengine-java] Re: Application restart for almost every request? What happened?
I think this is more supportive of not being able to use GAE for anything casual :) Serious applications don't seem to suffer from this problem. Jake On Jun 29, 9:28 am, Max max.at.xam...@gmail.com wrote: This is really one of the core problems why you cannot use GAE for anything serious. Even if you get enough traffic, some users suffer from instance recycling every second (read the comments at the issue). -- 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] a google app engine sample with objectify
Here: http://code.google.com/p/fulltext-search-in-objectify/ i made a port from a jdo to objectify for full text search, it is a start, but look in objectify page and group for best practices NM On Mon, Jun 28, 2010 at 3:19 PM, Ikai L (Google) ika...@google.com wrote: You might also want to ask this question on the Objectify Google Group: http://groups.google.com/group/objectify-appengine On Mon, Jun 28, 2010 at 5:05 AM, KeremPekcabuk kerempekca...@gmail.comwrote: Hi, is there any google app engine sample application which use objectify ? -- 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 Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Nicolás Meléndez Java Software Developer 1) Google App Engine works: 1.a) http://www.clasificad.com.ar (Local free classifieds for housing, sale, services, local community, curses,jobs, and events - GAE/J + Wicket + YUI) 1.b) http://www.chessk.com (Massive multiplayer chess online GAE/J + Applets + Wicket) 2) Linkedin: http://ar.linkedin.com/in/nicolasmelendez -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: JDO delete objects
I mean everytime my application will create an object so the id will keep increasing. In datastore viewer, I can delete them manually so this causes the difference in the two locations. I think you've answered that the local dev app server is different. Thanks very much On Jun 30, 1:15 am, Ian Marshall ianmarshall...@gmail.com wrote: (Of course, all this discussion is about the datastore in the GAE cloud, not a local one kept by the dev app server.) But why the key will keep incrementing by 1? This depends on how you have defined your persistent entity class. I have no preference for my key values, I just want them to be unique, so I let the datastore generate them at first persistence-time. I use encoded key strings with a Long ID extract. The IDs tend to increase for new instances, but I have seen no guarantee for this. This should not matter anyway(?). It seems like the data shown in 'datastore viewer' is inconsistent -- with the data shown under the runtime condition. What do you mean by this? (There can be small delays between persisting your data and it showing up on the data viewer.) -- 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.