google-app-engine

Error 500 on Google App Engine out of nothing

Hi, I got Error 500 on Google App Engine out nothing. http://oladic.appspot.com/ - this got error. The same code runs flawlessly at: http://blogthere.appspot.com/ and http://912.latest.oladic.appspot.com/ How could this be? ...

Images caching in browser - app-engine-patch aplication

Hi, I have a little problem with caching the images in the browser for my app-engine aplication I`m sending last-modified, expires and cache-control headers but image is loaded from the server every time. Here is the header part of the code: response['Content-Type'] = 'image/jpg' response['Last-Modified'] = current_time.strftime('%a, ...

How to create entities in one Entity group ?

I am building an app based on google app engine (Java) using JDO for persistence. Can someone give me an example or a point me to some code which shows persisting of multiple entities (of same type) using javax.jdo.PersistenceManager.makePersistentAll() within a transaction. Basically I need to understand how to put multiple entites i...

Need to update the primary key on existing objects in GAE Java

Hi, I am building a web app using GAE Java. I have a class that uses a Long ID (generated by appengine) as its primary key. I now want to create a new class that would be the parent class to this original class (a one to many relationship) however the child needs to have a primary key of type "key", not the Long ID I have now. What...

Can I define a read-only transaction using GAE's JDO?

I'm use the latest versions of the GWT GAE w/ JDO stack. I have a task queue updating persistent objects with the datastore. I also have a gwt user interface displaying the save objects (without modification). Given tightly defined transaction (start/commit) boundaries. Is there a way for me to define a read-only transaction for the GUI...

how to retry/recover from a java.sql.SQLexception: Concurrent Modification

Using JDO on GAE, I'm using a simple database transaction code block like below. What is a good way to retry/recover from a thrown java.sql.SQLException: Concurrent Modification? private final Provider pmp; ... PersistenceManager pm = pmp.get(); try { pm.currentTransaction().begin(); MyObject myObject= pm.getObjectById(MyObject.c...

How do I remove a field from a model in google app engine with java?

http://code.google.com/appengine/articles/update_schema.html shows how to remove a property from a model in python with delattr. Is there a way to do the same in java? Thanks! ...

I need help parsing this statement from the GAE/Java documentation on data classes

This section of the GAE/Java documentation is killing me. I would appreciate if someone could help me figure it out. If the field is not of a nullable value type, loading an entity without the corresponding property throws an exception. This won't happen if the entity was created from the same JDO class used to recreate the...

Google App Engine Datastore query problem

Hi to all, I have the following problem: I'd like to retrieve all products of a category class Category(emodel): name = db.StringProperty() class Channel(emodel): name = db.StringProperty() category = db.ReferenceProperty(Category,collection_name="cat_set") class Product(emodel): name = db.StringProperty() ...

How can I load test data into AppEngine automatically?

I'd like to automatically load some test data into the AppEngine datastore when a local copy is run by one of my team's developers. I know that the bulk uploader lets you do this from the command line, but I'm looking for something automatic. Inevitably we will forget to load data when we clear our test copies of the datastore. Currentl...

How to search in the GQL Viewer in appengine dashboard by key?

How to search in the GQL Viewer in appengine dashboard by key? I use this and it gives an error: SELECT * FROM Cache where __key__ = KEY('Cache', 'ag9wYWdhbGd1eS1zdGF0aWNyHAsSBUNhY2hlIhEvYnV0dG9ucy9lZGl0LmdpZgw ') ...

SourceForge like application (with version control) for GAE?

Hey. Recently kenai.com was announced to be closed soon so I need to migrate my project to some other hosting. I have started wondering, if there are blog apps you can install and run on GAE, maybe there is some way to setup SVN on GAE? Maybe there is Kenai/SourceForge type app I can put on GAE? Is it possible to setup my own project ...

How can an application know that it is running on Google AppEngine?

I am trying to find a way to make my Java Appengine application discover whether it is running on the Appengine servers or inside the development environment mini-server. I would like to do this programmatically, not via some property file or other configuration option. Anyone got any ideas? ...

GraniteDS on GAE datastore JPA - Key class problem

I'm using GraniteDS(2.1.0RC2) on GAE with JPA annotiations. I have following class on flex side: [Bindable] [RemoteClass(alias="models.User")] public class User { public var key :String; public var login :String; } and on java side: @Entity public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) priv...

App Engine JDO schema change. Updating new non nullable value.

The non nullable types include int and boolean. My question is how to update objects that are already persistent with a schema change adding a new variable of these types. It seems as though I cannot retrieve these objects because they now have a null variable where null is not allowed! According to: http://code.google.com/appengine/doc...

Need a way to count entities in GAE datastore that meet a certain condition? (over 1000 entities)

I'm building an app on GAE that needs to report on events occurring. An event has a type and I also need to report by event type. For example, say there is an event A, B and C. They occur periodically at random. User logs in and creates a set of entities to which those events can be attributed. When the user comes back to check the stat...

Replace newlines in a Unicode string

I am trying to replace newline characters in a unicode string and seem to be missing some magic codes. My particular example is that I am working on AppEngine and trying to put titles from HTML pages into a db.StringProperty() in my model. So I do something like: link.title = unicode(page_title,"utf-8").replace('\n','').replace('\r','...

Do heavier java libraries cause Google App Engine to take longer in starting instances?

Do heavier java libraries cause Google App Engine to take longer in starting instances? Even if the libary isn't used at all until later? ...

Loading Google App Engine app from one file for all the URLs or one file per URL for loading speed

I have a small web app running on AppEngine and have all my URL processing in one file and the other processing done in another file that is imported at the top of the main python. e.g. import wsgiref.handlers from wsgiref.handlers import format_date_time import logging import os import cgi import datetime from time import mktime #Go...

Cannot use external libraries for google app engine java project

I have an Eclipse with Google App Engine Plugin and Google App Engine SDK 1.3.0 installed on. I have created a new web project with Google App Engine SDK 1.3.0. Now, I want to add a library for some advanced JSTL syntax in jsp file, it's is EL-functors (http://el-functors.sourceforge.net). In order for EL-functors to pickup its advanced ...