[appengine-java] Re: Disappearing functionality after upgrading App Engine/GWT plugins
Thanks, Rajeev! I installed Eclipse as root, but then installed the older versions of the plugins/SDKs as myself (as well as the newer versions). Is your suggestions the only work-around? This thread cautions against installing plugins as root (for good reason): https://help.ubuntu.com/community/EclipseIDE Also, this makes me hesitant to attempt any future upgrade with the Google plugins/SDKs, as it appears to involve a re-installation of Eclipse (and the potential for lost work). I'd love to see another solution. Thanks, Ben -- 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] I cannot access the url of my deployed application? getting "Not Found"
Hi I got no firewall on the PC and i can log in into the "https:// appengine.google.com/dashboard?&app_id=*" Than when i browse to Administration -> Versions i click on the link of the application and getting immediate "Not Found" it looks like it doesn't even try to surf to the web page tried in FF and IE same result... Am im missing something? there is no trace in the logs either... so its not an application error.. It used to work and suddenly starting couple of days ago, it stopped. What can i do? -- 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] deploy through proxy
I am using Netbeans 6.8 with GAE plug-in. I need to deploy to GAE through a proxy. I've specified the correct proxy host and port in NB but still I got connection timeout in every deployment. The proxy host and prot is correct because they works in Eclipse. But not in NB. Seems the NB plug-in has its own way of handling proxy. Please help. Secondly, when deploying in NB, I was prompted for google login once only. But never in subsequent deployment. Where can I check the google id and password is stored? -- 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: same application same datastore different subdomain
On 14 Jul 2010, at 01:39, Shyam Visamsetty wrote: You definitely cannot share the data store between two applications as of now. Technically you actually can share data between applications using RemoteDatastore - you can divert datastore operations to a different application. http://code.google.com/p/remote-datastore/ But you need to be careful not to break Googles terms of use by trying to spread you load between different applications to avoid fees. -- 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: How to upload primary key as an id instead of name
You can do this now using the RemoteDatastore Java utility http://code.google.com/p/remote-datastore/ For example, this code runs on your desktop and creates a single entity in your live datastore: // divert datastore operations to live application RemoteDatastore.install(); RemoteDatastore.divert("http://myVersion.latest.myApp.appspot.com/remote-datastore ", "myApp", "myVersion"); // create an entity with a numeric key Key key = KeyFactory.createKey("MyKindName, 35); Entity entity1 = new Entity(key); entity1.setProperty("property1", "hello"); // put entity to the remote datastore DatastoreService service = DatastoreServiceFactory.getDatastoreService(); datastore.put(entity1); This also works for bulk puts On 14 Jul 2010, at 03:37, Matthew Blain wrote: Sorry, this won't be available until 1.3.6. You should be able to do something like this: - property: __key__ external_name: CityId export_transform: datastore.Key.id import_transform: lambda value: datastore.Key.from_path('City', int(value)) --Matthew On Jul 10, 5:53 pm, Pasha wrote: Could you please post an example. Thank you in advance. On Jun 30, 1:18 pm, Matthew Blain wrote: The 1.3.5 bulkloader client will allow you to specify a numeric key; you must use the Key constructor explicitly to do this, integers will still be converted into strings. On Jun 30, 12:12 am, MANISH DHIMAN wrote: Hi All When I upload data using CSV file on G A E. Primary key is stored there as a name instead of id. Example. Format of .yaml is Given below transformers: - kind: City connector: csv connector_options: encoding: utf-8 columns: from_header property_map: - property: __key__ external_name: CityId export_transform: datastore.Key.id - property: Name external_name: Name Primary key stored there is: ID/Name Name name=1Delhi name=2London Due to uploaded data with name=, when I am try to get Key from any Fetched Entities, then Key contains only name value but id value is 0 and also name contains long value as a String instance. Is it possible to store primary key(Using CSV while uploading data) in a format given below : ID/Name Name id=1Delhi id=2London When data is stored with id=, then Key contains id value is as long instance. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How to upload primary key as an id instead of name
Sorry, this won't be available until 1.3.6. You should be able to do something like this: - property: __key__ external_name: CityId export_transform: datastore.Key.id import_transform: lambda value: datastore.Key.from_path('City', int(value)) --Matthew On Jul 10, 5:53 pm, Pasha wrote: > Could you please post an example. Thank you in advance. > > On Jun 30, 1:18 pm, Matthew Blain wrote: > > > > > The 1.3.5 bulkloader client will allow you to specify a numeric key; > > you must use the Key constructor explicitly to do this, integers will > > still be converted into strings. > > > On Jun 30, 12:12 am, MANISH DHIMAN wrote: > > > > Hi All > > > When I upload data using CSV file on G A E. Primary key is stored > > > there as a name instead of id. > > > Example. > > > > Format of .yaml is Given below > > > transformers: > > > - kind: City > > > connector: csv > > > connector_options: > > > encoding: utf-8 > > > columns: from_header > > > property_map: > > > - property: __key__ > > > external_name: CityId > > > export_transform: datastore.Key.id > > > - property: Name > > > external_name: Name > > > > Primary key stored there is: > > > ID/Name Name > > > name=1 Delhi > > > name=2 London > > > > Due to uploaded data with name=, when I am try to get Key > > > from any Fetched Entities, then Key contains only name value but id > > > value is 0 and also name contains long value as a String instance. > > > > Is it possible to store primary key(Using CSV while uploading data) in > > > a format given below : > > > ID/Name Name > > > id=1 Delhi > > > id=2 London > > > > When data is stored with id=, then Key contains id value is > > > as long instance. -- 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: Java Server Faces 2.0 does not works in GAE (for me)
Silly error...! I mistakenly named welcome.xhtml as welcome.xhml Sorry, JSF 2.0 works for me too! On 12 jul, 19:02, SammyBar wrote: > Hi all, > > I'm trying to config my first Java Server Faces project with GAE. I > have already configured my Eclipse following instructions published > athttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P..., > and also included the fix on the jsf-impl-gae.jar. I'm able to run my > project in Eclipse without errors. The console displays "INFO: The > server is running athttp://localhost:/";. It looks everything is > OK. > But when I direct the browser to the above mentioned URL, I get a HTTP > 404 error "/welcome.jsf not found" > I'm able to put a breakpoint in the index.jsp page at "<% > response.sendRedirect("welcome.jsf"); %>" It confirms me the app is > working because the breakpoint is reached, but it looks like the > server is unable to "understand" the "welcome.xhtml" file should be > processed as "welcome.jsf". Similarly by pointing the browser > tohttp://localhost:/welcome.xhtmlalso returns a 404 error. What is > wrong with my configuration? > > Any hint is welcomed. > Thanks in advance > Sammy > > Follows the appengine-web.xml and web.xml files from my war/WEB-INF > folder which are copies of the reccommended files published in the > above mentioned site: > > --- appengine-web.xml > > > http://appengine.google.com/ns/1.0";> > TestJSF > 1 > true > > > > > > > > > --- web.xml > > > http://java.sun.com/xml/ns/javaee"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > > xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";> > > Wildstar Technologies, LLC. Google AppEngine JSF 2.0 Template > > > Template JSF 2.0 application configured to run on the Google > AppEngine for Java. > > > > javax.faces.STATE_SAVING_METHOD > server > > > javax.faces.DEFAULT_SUFFIX > .xhtml > > > > com.sun.faces.expressionFactory > com.sun.el.ExpressionFactoryImpl > > > > Set this flag to true if you want the JavaServer Faces > Reference Implementation to validate the XML in your > faces-config.xml resources against the DTD. Default > value is false. > > com.sun.faces.validateXml > true > > > > > When enabled, the runtime initialization and default > ResourceHandler > implementation will use threads to perform their functions. Set > this > value to false if threads aren't desired (as in the case of > running > within the Google Application Engine). > > Note that when this option is disabled, the ResourceHandler will > not > pick up new versions of resources when ProjectStage is > development. > > com.sun.faces.enableThreading > false > > > > Faces Servlet > javax.faces.webapp.FacesServlet > 1 > > > Faces Servlet > /faces/* > *.jsf > > > 30 > > > index.jsp > index.xhtml > index.html > > -- 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: Java Server Faces 2.0 does not works in GAE (for me)
It looks fine to me... all ur settings and configs aresame as at my web app i also took them from that web site If i were u i would delete the project and build it from scratch.. its probably some silly mistake... its not that u in the middle of the project.. u just started it should work good luck On Jul 13, 3:02 am, SammyBar wrote: > Hi all, > > I'm trying to config my first Java Server Faces project with GAE. I > have already configured my Eclipse following instructions published > athttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P..., > and also included the fix on the jsf-impl-gae.jar. I'm able to run my > project in Eclipse without errors. The console displays "INFO: The > server is running athttp://localhost:/";. It looks everything is > OK. > But when I direct the browser to the above mentioned URL, I get a HTTP > 404 error "/welcome.jsf not found" > I'm able to put a breakpoint in the index.jsp page at "<% > response.sendRedirect("welcome.jsf"); %>" It confirms me the app is > working because the breakpoint is reached, but it looks like the > server is unable to "understand" the "welcome.xhtml" file should be > processed as "welcome.jsf". Similarly by pointing the browser > tohttp://localhost:/welcome.xhtmlalso returns a 404 error. What is > wrong with my configuration? > > Any hint is welcomed. > Thanks in advance > Sammy > > Follows the appengine-web.xml and web.xml files from my war/WEB-INF > folder which are copies of the reccommended files published in the > above mentioned site: > > --- appengine-web.xml > > > http://appengine.google.com/ns/1.0";> > TestJSF > 1 > true > > > > > > > > > --- web.xml > > > http://java.sun.com/xml/ns/javaee"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > > xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";> > > Wildstar Technologies, LLC. Google AppEngine JSF 2.0 Template > > > Template JSF 2.0 application configured to run on the Google > AppEngine for Java. > > > > javax.faces.STATE_SAVING_METHOD > server > > > javax.faces.DEFAULT_SUFFIX > .xhtml > > > > com.sun.faces.expressionFactory > com.sun.el.ExpressionFactoryImpl > > > > Set this flag to true if you want the JavaServer Faces > Reference Implementation to validate the XML in your > faces-config.xml resources against the DTD. Default > value is false. > > com.sun.faces.validateXml > true > > > > > When enabled, the runtime initialization and default > ResourceHandler > implementation will use threads to perform their functions. Set > this > value to false if threads aren't desired (as in the case of > running > within the Google Application Engine). > > Note that when this option is disabled, the ResourceHandler will > not > pick up new versions of resources when ProjectStage is > development. > > com.sun.faces.enableThreading > false > > > > Faces Servlet > javax.faces.webapp.FacesServlet > 1 > > > Faces Servlet > /faces/* > *.jsf > > > 30 > > > index.jsp > index.xhtml > index.html > > -- 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] Disappearing functionality after upgrading App Engine/GWT plugins
Hi, Did you install Eclipse as root? Did you perform the upgrade as non-root? There is an issue in Eclipse with installing it as root, and then updating plugins as non-root. I'd recommend that if you install Eclipse as root, switch to root when updating your plugins. It might be easiest to start out with a clean Eclipse install and a clean workspace. Rajeev On Mon, Jul 12, 2010 at 1:38 AM, ThisSideUp < webmas...@thissideupsoftware.com> wrote: > Hello, > > I am running on Ubuntu 8.04 LTS, using Eclipse Galileo. I am new to > the App Engine, GWT, and Eclipse. > > Back in April I installed the App Engine and GWT plugins and started > experimenting with a web app project that uses the App Engine & GWT. > > Today I was prompted to upgrade the plugins: > - App Engine SDK bundle from 1.3.2 to 1.3.5 > - GWT SDK bundle from 2.0.3 to 2.0.4 > > After doing so, all of the App Engine and GWT buttons and menu options > disappeared from Eclipse, and I can no longer run the web app nor can > I create new web app projects. > > I attempted to resolve the problem by removing the 1.3.2 and 2.0.3 > versions of the plugins, but now my web app does not compile. > > I am familiar with using Maven to update dependencies, but I do not > have Maven installed right now. How do I go about getting my web app > to use the new versions of the libraries, and how do I fix my Eclipse > configuration? > > Thanks in advance. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.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: same application same datastore different subdomain
You definitely cannot share the data store between two applications as of now. But, you can definitely create another application a2 which contains a webservice which can call a service from an application a1. -Shyam. On Jul 13, 5:22 am, IvanRdz wrote: > Hello world! > > I want to know if is possible to use the same datastore across > multiple (or different) subdomains/applications. I have googleapps > account and I have already configure it with www domain for the main > app. > > What I want to do is: > > www.myapp.com-- user interface application, gwt developed and RPC for > server calls > api.myapp.com -- Restful webservices (wich have to communicate > acrosswww.myapp.combussines logic) > > It is possible? -- 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: problem with storing data in datastore
So, if you are directly accessing the stream, it is still in memory and not stored anywhere. I think you should try logging the stream you receive. I think it is hitting a null ptr exception for some reason. did you use printstacktrace in your catch block? Thanks, Shyam. On Jul 13, 1:47 am, Vishakha wrote: > Hi I am akriti's team member. > > This is part of my servlet code. > > public void doPost(HttpServletRequest request, HttpServletResponse > response) throws ServletException, IOException { > { > ServletFileUpload upload = new ServletFileUpload(); > > try{ > FileItemIterator iter = upload.getItemIterator(request); > > while (iter.hasNext()) { > FileItemStream item = iter.next(); > String name = item.getFieldName(); > InputStream stream = item.openStream(); > // try{ > Kml kml = Kml.unmarshal(stream); > > //if (kml == null) > { > Feature feature = kml.getFeature(); > processFeature(null, feature); > } > > On Jul 13, 12:31 pm, Pieter Coucke wrote: > > > > > Could it be that the file upload tries to store the file in a temporary > > directory somewhere? > > > -- > > Pieter Coucke > > Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be- 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: Sending mail in transaction
I was thinking about storing some unique string which is derived from email content and recipient (i have some unique stuff sending in each mail) and store in memcache/db, I know its not bullet proof but at least in case some possible 2x sending mail would be filtered. Concept : Check flag if set we know we did send Send mail, if successful, set some flag in memcache/db I am aware ITS NOT BULLET PROOF, but maybe can filter some cases, when same task is triggered after that interval neccessary to change/store flag. What you think ? On Jul 13, 5:15 pm, dflorey wrote: > The request headers will not help. > You'll run into problems whenever you are doing an api call that > return with an unknown state and the method you are calling is not > idempotent (like sending mail, creating a contact etc.) > So in case of email you can add your app as bcc and use a mail-in > handler to check whether the mail has been sent successfully or not. > This is an ugly workaround but there is nothing else that comes to my > mind. > > On 12 Jul., 22:54, Marcus Brody wrote: > > > dflorey and Pieter, > > > thank you for the links, > > I will look into it asap. > > > On Jul 12, 10:35 pm, Pieter Coucke wrote: > > > > You can check request headers to see if this is a first invocation of a > > > task > > > (http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta...), > > > so you can detect a second invocation of a task. > > > > Maybe if you combine this with specific catch blocks for mail exceptions? > > > > On Mon, Jul 12, 2010 at 10:07 PM, Marcus Brody wrote: > > > > Pieter, > > > > > although this looks easy its not that easy, I am aware that I can > > > > queue a mail sending task, > > > > problem is that task has to be idempotent to achiev desired behaviour, > > > > > a queue task can be executed for example twice, since those are > > > > specifications > > > > and this would result in sending mail twice, > > > > a naive aproach would be to update some db lock to prevent sending > > > > mail more than 1 time, > > > > but it is not easy, this is much more complicated, > > > > in other words operation is either atomic or it isnt, and without very > > > > precise mechanism you > > > > cannot prove that task will be runned only one. > > > > > My own tests proved that due to email quota being reached (task fail > > > > and has be resheduled) some of the mails > > > > has been send twice. > > > > > If Mail API would allowed to send mail only in case of some db > > > > transaction success it would be very easy to garant > > > > that mail will be send exactly 1 time. (although if it fails for some > > > > other reasons like recipient not found or so thats whole another > > > > story :) > > > > > Basically this can be solved by > > > > 1) adding new API for sending mail (dont know if it so easy or whole > > > > problem isnt much much bigger than i think - distributed > > > > transactions ?) > > > > 2) implementing locking mechanism > > > > > On Jul 12, 9:13 pm, Pieter Coucke wrote: > > > > > Create a task for sending e-mail instead of calling the mailservice > > > > > directly. > > > > > > use this in your task (a task can be part of a transaction) > > > > > > try{ > > > > > ... > > > > > > } catch (Throwable thr) { > > > > > log.error(...); > > > > > } > > > > > > and all exceptions will be catched. I think a task will be > > > > > re-executed > > > > only > > > > > if it fails (throws an exception). > > > > > > On Sat, Jul 10, 2010 at 6:43 PM, Marcus Brody > > > > wrote: > > > > > > Hello, > > > > > > > I would like to ask, if there is some way how to send mail only in > > > > > > case that some db transaction will be successful. > > > > > > I am not very experienced with gae, but I did study it now for > > > > > > about 2 > > > > > > weeks. > > > > > > > Desired output: > > > > > > > 1) prepare email > > > > > > 2) db transaction.begin() > > > > > > 3) do some db operation > > > > > > 4) bind sending mail with current transaction (similar to > > > > > > how can you can attach Task to queue) > > > > > > 5) db transaction.commit() > > > > > > > I am aware that I can queue mail sending task to task queue, but i > > > > > > cannot find the way how to do that mail sending task Idempotent > > > > > > without (i think) complicated locking mechanism . > > > > > > Most simple solution would be to put mail sending task to task > > > > > > queue, > > > > > > but this means mail could be send twice in some rare situation. > > > > > > (this > > > > > > is maybe not that bad but if there is some way how to avoid it, I > > > > > > would like to know) > > > > > > > Thank you, > > > > > > > Marcus > > > > > > > -- > > > > > > 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 unsubscri
[appengine-java] Re: problem with storing data in datastore
Hi I am akriti's team member. This is part of my servlet code. public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { { ServletFileUpload upload = new ServletFileUpload(); try{ FileItemIterator iter = upload.getItemIterator(request); while (iter.hasNext()) { FileItemStream item = iter.next(); String name = item.getFieldName(); InputStream stream = item.openStream(); // try{ Kml kml = Kml.unmarshal(stream); //if (kml == null) { Feature feature = kml.getFeature(); processFeature(null, feature); } On Jul 13, 12:31 pm, Pieter Coucke wrote: > Could it be that the file upload tries to store the file in a temporary > directory somewhere? > > -- > Pieter Coucke > Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be -- 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: problem with storing data in datastore
Hi I am akriti's team member. This is part of my servlet code. public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { { ServletFileUpload upload = new ServletFileUpload(); try{ FileItemIterator iter = upload.getItemIterator(request); while (iter.hasNext()) { FileItemStream item = iter.next(); String name = item.getFieldName(); InputStream stream = item.openStream(); // try{ Kml kml = Kml.unmarshal(stream); //if (kml == null) { Feature feature = kml.getFeature(); processFeature(null, feature); } On Jul 13, 12:31 pm, Pieter Coucke wrote: > Could it be that the file upload tries to store the file in a temporary > directory somewhere? > > -- > Pieter Coucke > Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be -- 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] How long is my application state hold on the app engine?
hello everyone, i want to collect some performance figures of my app on the server side. but i do not want to persist them in the database, i only want to collect them by changing the state of some class (i.e. changing class members like number of requests, number of method calls, etc). i want to read these values on the client side and display them in an administration panel (or a profiler-like ui). but currently i think the application state is at least lost after each new deployment. is this the only time the state is resetted? does a jvm holding my application state run all the time between each deployment? i have the same question regarding static members. i use singletons or static variables on server side to make sure they are constructed only once whenever their construction is expensive. so i want to make sure that the jvm holding the instances is running for a very long time to avoid reconstruction of them. however, it feels like the jvm is restarted relatively often (due to very low load on my app maybe) and thus the singletons are recreated during the jvm startup. kind regards, ingo -- 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: Cannot see 'New Web Application' in New menu
Thanks, 3.6 as root was the problem. John On Jul 7, 7:56 pm, Jason Parekh wrote: > Hi John, > > Do you see any of the other Google Plugin for Eclipse features, like a few > toolbar buttons? > > Did you happen to install Eclipse 3.6 as root and the plugin as your user? > There's a known Eclipse issue where in some cases, that situation can lead > installed plugins not appearing, similar to your symptoms. If this is the > case, try installing Eclipse as your user and also run it with the same > user. > > jason > > > > On Wed, Jul 7, 2010 at 11:19 AM, John wrote: > > I've installed the google plugin into a clean install of Eclipse 3.6 > > on ubuntu. The install finished without reporting any errors, and > > eclipse restarted successfully, but the File -> New option doesn't > > have the Web Application Project choice in it. > > > Can someone tell me what I've done wrong? > > > John > > > -- > > 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 > 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: Sending mail in transaction
The request headers will not help. You'll run into problems whenever you are doing an api call that return with an unknown state and the method you are calling is not idempotent (like sending mail, creating a contact etc.) So in case of email you can add your app as bcc and use a mail-in handler to check whether the mail has been sent successfully or not. This is an ugly workaround but there is nothing else that comes to my mind. On 12 Jul., 22:54, Marcus Brody wrote: > dflorey and Pieter, > > thank you for the links, > I will look into it asap. > > On Jul 12, 10:35 pm, Pieter Coucke wrote: > > > > > You can check request headers to see if this is a first invocation of a task > > (http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta...), > > so you can detect a second invocation of a task. > > > Maybe if you combine this with specific catch blocks for mail exceptions? > > > On Mon, Jul 12, 2010 at 10:07 PM, Marcus Brody wrote: > > > Pieter, > > > > although this looks easy its not that easy, I am aware that I can > > > queue a mail sending task, > > > problem is that task has to be idempotent to achiev desired behaviour, > > > > a queue task can be executed for example twice, since those are > > > specifications > > > and this would result in sending mail twice, > > > a naive aproach would be to update some db lock to prevent sending > > > mail more than 1 time, > > > but it is not easy, this is much more complicated, > > > in other words operation is either atomic or it isnt, and without very > > > precise mechanism you > > > cannot prove that task will be runned only one. > > > > My own tests proved that due to email quota being reached (task fail > > > and has be resheduled) some of the mails > > > has been send twice. > > > > If Mail API would allowed to send mail only in case of some db > > > transaction success it would be very easy to garant > > > that mail will be send exactly 1 time. (although if it fails for some > > > other reasons like recipient not found or so thats whole another > > > story :) > > > > Basically this can be solved by > > > 1) adding new API for sending mail (dont know if it so easy or whole > > > problem isnt much much bigger than i think - distributed > > > transactions ?) > > > 2) implementing locking mechanism > > > > On Jul 12, 9:13 pm, Pieter Coucke wrote: > > > > Create a task for sending e-mail instead of calling the mailservice > > > > directly. > > > > > use this in your task (a task can be part of a transaction) > > > > > try{ > > > > ... > > > > > } catch (Throwable thr) { > > > > log.error(...); > > > > } > > > > > and all exceptions will be catched. I think a task will be re-executed > > > only > > > > if it fails (throws an exception). > > > > > On Sat, Jul 10, 2010 at 6:43 PM, Marcus Brody > > > wrote: > > > > > Hello, > > > > > > I would like to ask, if there is some way how to send mail only in > > > > > case that some db transaction will be successful. > > > > > I am not very experienced with gae, but I did study it now for about 2 > > > > > weeks. > > > > > > Desired output: > > > > > > 1) prepare email > > > > > 2) db transaction.begin() > > > > > 3) do some db operation > > > > > 4) bind sending mail with current transaction (similar to > > > > > how can you can attach Task to queue) > > > > > 5) db transaction.commit() > > > > > > I am aware that I can queue mail sending task to task queue, but i > > > > > cannot find the way how to do that mail sending task Idempotent > > > > > without (i think) complicated locking mechanism . > > > > > Most simple solution would be to put mail sending task to task queue, > > > > > but this means mail could be send twice in some rare situation. (this > > > > > is maybe not that bad but if there is some way how to avoid it, I > > > > > would like to know) > > > > > > Thank you, > > > > > > Marcus > > > > > > -- > > > > > 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 > > > > unsubscr...@googlegroups.com> > > > > > %252bunsubscr...@googlegroups.com> > > > > > > . > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/google-appengine-java?hl=en. > > > > > -- > > > > Pieter Coucke > > > > Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be > > > > -- > > > 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 > > unsubscr...@googlegroups.com> > > > . > > > For more op
[appengine-java] How to assing an enitity to two different enitites ?
Hello, I would like to build an web application where the entity relationship looks like as follow: User 1 -> * Possibility * -> 1 Country 1 -> 1 Profile * -> 1 Country *initialization and persistence* User.getPossibilities().add(Possibility);Possibility.setCountry(Country); User.setProfile(Profile);Profile.setCountry(Country); em.persist(User); *I got this error below* WARNING: Exception:Detected attempt to establish CPossibility(no-id-yet) as the parent of CUser(46)/CProfile(47)/CCountry(48) but the entity identified by CUser (46)/CProfile(47)/CCountry(48) is already a child of CUser(46)/CProfile(47). A parent cannot be established or changed once an object has been persisted. Does this concept goes against the GAE datastore hierarchy ? There are many situation when we have to share the same locations among the individual object. What is the real solution on this issue ? Thanks in advance. cscsaba *PS:Implementation of the entities* ... CUser @Entity public class CUser { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="USER_ID") private Key Id; private String email; @OneToMany(cascade = CascadeType.ALL) private List Possibilities = new ArrayList(); @OneToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL) private CProfile Profile; ... CPossibility @Entity public class CPossibility { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="POSSIBILITY_ID") private Key id; private String name; @ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL) private CCountry country; ... CProfile @Entity public class CProfile { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; private String phone; @ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL) private CCountry country; ... CCountry @Entity public class CCountry { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; private String name; -- 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: GAE JavaMail jumbles UTF-8
Sounds good, thanks for trying, but it didn't help for me :-( Also I need a solution for the html body as well... Anyone? On Jul 13, 8:45 am, Peter Ondruska wrote: > You should encode subject if using non-ASCII: > > msg.setSubject(MimeUtility.encodeText(_subject, "UTF-8", "Q")); > > On Jul 12, 9:03 pm, Pieter Coucke wrote: > > > > > I can only confirm I see the same issue when sending e-mail with a German ü > > in the subject. I haven't found a solution yet. > > > On Mon, Jul 12, 2010 at 3:04 PM, Marc Hacker wrote: > > > On Google App Engine Java email service, I am trying to send a UTF8 > > > (Hebrew) email subject and body but they arrive (in Gmail) jumbled as > > > > Here is my code > > > > MimeMessage msg = new MimeMessage(session); > > > msg.setSubject(emailSubject, "UTF-8"); > > > > Multipart mp = new MimeMultipart(); > > > MimeBodyPart htmlPart = new MimeBodyPart(); > > > htmlPart.setContent(htmlBody, "text/html; charset=UTF-8"); > > > mp.addBodyPart(htmlPart); > > > msg.setContent(mp); > > > Transport.send(msg); > > > > I noticed that my browser is treating the email when viewed in Gmail > > > us Unicode UTF8 so that isn't the problem. > > > > Any ideas please? > > > > Marc > > > > -- > > > 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 > > unsubscr...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine-java?hl=en. > > > -- > > Pieter Coucke > > Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be -- 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] same application same datastore different subdomain
Hello world! I want to know if is possible to use the same datastore across multiple (or different) subdomains/applications. I have googleapps account and I have already configure it with www domain for the main app. What I want to do is: www.myapp.com -- user interface application, gwt developed and RPC for server calls api.myapp.com -- Restful webservices (wich have to communicate across www.myapp.com bussines logic) It is possible? -- 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: sessions - configured but don't work on first call
Maybe this should be a gwt question. I was thinking getThreadLocalRequest().getSession() was appengine related but maybe that's not the case. Shawn -- 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] sessions - configured but don't work on first call
Hello, A call to my app invokes a filter which starts a session via request.getSession(true); here is the id: czbgfo2bp5vs Then it proceeds to serve a non-static page, but the client shows no JSESSION id. Then the client make an rpc call which again generates a new session via the filter. id: 8vl3kpun0rt5 Then the rpc call is processed in in my rpc method and gets the session id like this this.getThreadLocalRequest().getSession(); id: 8vl3kpun0rt5 I can see JSESSIONID is now set after returning from the rpc call. Subsequent calls show the filter recognize the session as id: 8vl3kpun0rt5 Is this.getThreadLocalRequest().getSession(); the only way to start a session? Why can't a filter start a session? this.getThreadLocalRequest().getSession(); will find a session created by a filter via request.getSession(true); but request.getSession(true); doesn't seem so send a cookie to the client. I really can't understand this. Help please Shawn -- 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] Deleted all the data, but Storable Data summary still shows 72%
wait for some time. it takes little time to update. -- Prashant www.claymus.com -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Deleted all the data, but Storable Data summary still shows 72%
hi, I deleted all the objects, but Total Stored data still shows 72%. Why ? I tried to lookup the data using Datastore viewer, but could not see any objects. Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError
hi, Adrian If I upload an not image file ,I met the oom error. If I upload an image file,I met "Must call one of set*BlobStorage() first." Where to add "fileInput.setName("file");" I use java. -- 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: problem with storing data in datastore
Could it be that the file upload tries to store the file in a temporary directory somewhere? -- Pieter Coucke Onthoo BVBA http://www.onthoo.com http://www.koopjeszoeker.be -- 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.