[appengine-java] Re: 1MB limit and multi-put in datastore bug?
Each api request have limit 1MB. You can send 1 object about 1MB, or 10 objects about 100KB. Gae have limit for request-response, not for object size. On 17 май, 23:12, Mouseclicker jens.h...@googlemail.com wrote: Hi, it seems that the put() in the datastore call with the Iterable parameter does not work as documented: From what I read in the documentation it should be possible to store at most 500 entities in one put()-call and each entity having a max. size of 1MB. But it seems to be implemented in a way that the sum of all entities passed in the put call must not exceed 1MB. Is that intended? I split large files in chunks of almost 1 MB and for efficiency reasons I want to store multiple Blobs in one put call. But this even fails for two of them with a RequestTooLargeException. (done on local dev server) Can someone confirm this behavior? -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: composit primary key issue
You can combine two fields in one string-field and use it as String PK On 11 май, 14:14, aptest1 actiprocess apte...@gmail.com wrote: We are unable to use two fileds as the compisit primary keys in google datastore, its throwing follwing exception if we make two fields as primary key fileds.please help us to resolve this iusse our company class has two primary keys as below, we are using companyId,docId as primary keys *** @PersistenceCapable(identityType=IdentityType.DATASTORE) public class Company{ �...@primarykey @Persistent(valueStrategy = IdGeneratorStrategy.SEQUENCE) private Long companyId; @PrimaryKey String docId } if we start the server we are getting the following Exception : *** *s May 11, 2010 10:07:31 AM org.datanucleus.metadata.AbstractClassMetaData determineObjectIdClass SEVERE: Class com.atp.smartstore.DB.config.User has application- identity and no objectid-class specified yet has 2 primary key fields. Unable to use SingleFieldIdentity. Class com.atp.smartstore.DB.config.User has application-identity and no objectid-class specified yet has 2 primary key fields. Unable to use SingleFieldIdentity. May 11, 2010 10:07:31 AM org.datanucleus.enhancer.DataNucleusEnhancer main SEVERE: DataNucleus Enhancer completed with an error. Please review the enhancer log for full details. Some classes may have been enhanced but some caused errors Class com.atp.smartstore.DB.config.User has application-identity and no objectid-class specified yet has 2 primary key fields. Unable to use SingleFieldIdentity. org.datanucleus.metadata.InvalidMetaDataException: Class com.atp.smartstore.DB.config.User has application-identity and no objectid-class specified yet has 2 primary key fields. Unable to use SingleFieldIdentity. at org.datanucleus.metadata.AbstractClassMetaData.determineObjectIdClass(Abstr actClassMetaData.java: 1032) at org.datanucleus.metadata.ClassMetaData.populate(ClassMetaData.java: 205) at org.datanucleus.metadata.MetaDataManager $1.run(MetaDataManager.java:2317) at java.security.AccessController.doPrivileged(Native Method) at org.datanucleus.metadata.MetaDataManager.populateAbstractClassMetaData(Meta DataManager.java: 2311) at org.datanucleus.metadata.MetaDataManager.populateFileMetaData(MetaDataManag er.java: 2148) at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaD ataManager.java: 864) at org.datanucleus.metadata.MetaDataManager.loadClasses(MetaDataManager.java: 433) at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNu cleusEnhancer.java: 743) at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.ja va: 545) at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java: 1252) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java: 25) at java.lang.reflect.Method.invoke(Method.java:585) at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java: 57) at com.google.appengine.tools.enhancer.Enhance.init(Enhance.java: 60) at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41) -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] CPU usage
I have two applications with ping servlet with cron every minute For app1 - every request take 45 cpu_ms (9 api_cpu_ms), it have 124 requests of ping for last 21 hour and have no other request. It have 0.19 hours CPU usage. For app2 every request take 115 cpu_ms (85 api_cpu_ms), it have 147 requests of ping for lasr 21 hour and have no other requests. It have 0.1 hours CPU usage. Question: Why app1 with faster ping and less requests have more CPU usage? -- 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: changing datamodel later
You can use Long instead of long and long getProperrty{ return val != null ? val.longValue : 0; } On 26 апр, 17:10, Matthias Koch umbella@googlemail.com wrote: Hi, I'm new to appengine. and have the first problem hopefully someone can help me. I have just a simple Entiy class like this: @Entity public class GuestbookEntry { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key key; private String username; private String message; .. } this class will be persisted with jpa. this works fine so far. but know I will update this class and add a new field: private long time; when I now start the app and will get the data that is allready stored I allways get this error: java.lang.NullPointerException: Datastore entity with kind GuestbookEntry and key GuestbookEntry(1) has a null property named time. This property is mapped to net.umbella.appengine.services.guestbook.model.GuestbookEntry.time, which cannot accept null values normaly I would update the db schema by myself, andi can add a default value 0 to all existing entry. but how do I solve this problem on appengine ? thanks kindest regards Matthias -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: changing datamodel later
if you want search by value of new property you must resave each object with new schema. On 26 апр, 17:10, Matthias Koch umbella@googlemail.com wrote: Hi, I'm new to appengine. and have the first problem hopefully someone can help me. I have just a simple Entiy class like this: @Entity public class GuestbookEntry { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key key; private String username; private String message; .. } this class will be persisted with jpa. this works fine so far. but know I will update this class and add a new field: private long time; when I now start the app and will get the data that is allready stored I allways get this error: java.lang.NullPointerException: Datastore entity with kind GuestbookEntry and key GuestbookEntry(1) has a null property named time. This property is mapped to net.umbella.appengine.services.guestbook.model.GuestbookEntry.time, which cannot accept null values normaly I would update the db schema by myself, andi can add a default value 0 to all existing entry. but how do I solve this problem on appengine ? thanks kindest regards Matthias -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Guice filter
On local machine I use guice for servlet-injection and map url to servlets: serve(/api).with(RemoteAPIImpl.class); serve(/shoplist/api).with(RemoteAPIImpl.class); and it work. On appengine servers it serve don't work and I have 404 error. -- 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] Is appstats work on appengine servers?
I install appstat for my application and i see stats for my development server, but i don't see stat for my application in 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.
[appengine-java] Re: Guice filter
I use 1.3.3.1 On 25 апр, 14:40, seleronm seler...@gmail.com wrote: Hi, On local machine I use guice for servlet-injection and map url to servlets: serve(/api).with(RemoteAPIImpl.class); serve(/shoplist/api).with(RemoteAPIImpl.class); and it work. On appengine servers it serve don't work and I have 404 error. What is the version of SDK that you are using? Though I am not trying in detail It is likely to be corrected with SDK 1.3.3.1. http://code.google.com/p/googleappengine/downloads/list Please try. 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 athttp://groups.google.com/group/google- appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] String datatype
http://code.google.com/intl/en/appengine/docs/java/datastore/dataclasses.html short text string is 500 characters or 500 bytes? For example Russian characters encoded by two bytes of UTF-8. -- 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] Indexes for one field
Can I see how mach space take one-field indexes and every index - for decide about delete some indexes and monitoring for indexes that i don't want create (for example if i forgot add gae.unindexed in JDO or make mistake in it). -- 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: JDP, get objects by id
I tried it: ListDBObjectAccessaccessList = (ListDBObjectAccess) query.execute(user.getKey()); ArrayListKey ids = new ArrayListKey(); ... query = pm.newQuery(DBPurchaseItem.class, :idCollection.contains(id)); ListDBPurchase dPurchases = (ListDBPurchase)query.execute(ids); and catch Exception: org.datanucleus.store.appengine.query.DatastoreQuery $UnsupportedDatastoreFeatureException Problem with query SELECT FROM ru.abc_software.shoplist.server.data.DBPurchaseItem WHERE :idCollection.contains(id): Unsupported method contains while parsing expression: InvokeExpression{[ParameterExpression{idCollection}].contains(VariableExpression{id})} On 18 апр, 12:59, datanucleus andy_jeffer...@yahoo.com wrote: Is exsists any other way to get objects by one query from program, if I don't sure in exsists every of it? Errm, a JDOQL query perhaps SELECT FROM mydomain.MyClass WHERE :idCollection.contains(id) and pass in a collection containing the ids of the objects you need. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: JDP, get objects by id
It's my mistake - in my class primary key names key instead of id; On 20 апр, 19:35, Timofey Koolin timo...@koolin.ru wrote: I tried it: ListDBObjectAccessaccessList = (ListDBObjectAccess) query.execute(user.getKey()); ArrayListKey ids = new ArrayListKey(); ... query = pm.newQuery(DBPurchaseItem.class, :idCollection.contains(id)); ListDBPurchase dPurchases = (ListDBPurchase)query.execute(ids); and catch Exception: org.datanucleus.store.appengine.query.DatastoreQuery $UnsupportedDatastoreFeatureException Problem with query SELECT FROM ru.abc_software.shoplist.server.data.DBPurchaseItem WHERE :idCollection.contains(id): Unsupported method contains while parsing expression: InvokeExpression{[ParameterExpression{idCollection}].contains(VariableExpre ssion{id})} On 18 апр, 12:59, datanucleus andy_jeffer...@yahoo.com wrote: Is exsists any other way to get objects by one query from program, if I don't sure in exsists every of it? Errm, a JDOQL query perhaps SELECT FROM mydomain.MyClass WHERE :idCollection.contains(id) and pass in a collection containing the ids of the objects you need. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] JDP, get objects by id
Right theme: JDO, get objects by id On 17 апр, 08:38, Timofey Koolin timo...@koolin.ru wrote: I need get some objects by ID from datastore, but I'm not sure exsists every objects (some objects may was delete before my request). PersistenceManager.getObjectsById(...) throw exception if not objects exsists. GQL quote 30 keys in 'IN' query. Is exsists any other way to get objects by one query from program, if I don't sure in exsists every of it? -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: JDP, get objects by id
Thanks On 18 апр, 12:59, datanucleus andy_jeffer...@yahoo.com wrote: Is exsists any other way to get objects by one query from program, if I don't sure in exsists every of it? Errm, a JDOQL query perhaps SELECT FROM mydomain.MyClass WHERE :idCollection.contains(id) and pass in a collection containing the ids of the objects you need. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Create Online Game That Contains High Change Data
You can store your data in memcache and in datastore. Then you read data from memcache or (if is'n exsists in memcache) from datasrore. Or you can use write-behind cache http://www.youtube.com/watch?v=HL5igKTuN8M On 17 апр, 08:04, Phuong Nguyen phuongn...@gmail.com wrote: Hi guys, I'm creating an online game server with GAE and there's a few concerns that I'd like to ask for advice. One of my problem is that I need to manage a lot of information that would not make sense to be stored in database. Like the status of each player, the last time server seen such player, his current position in the game. I'd like to store all of these information in the memory and periodically persist back to the data store. Problem is (correct me if I'm wrong) that GAE may shutdown my app and restart it on different server at any time, so, data in memory would be gone and I need to reload them from the database. But, certainly, if GAE Server restart my app before the periodical saving happens, then the status of players may be gone without my ability to recover back from database. And, these data are subject to high change, so, persist them to data store frequently would not be sensible. So, I may encounter problems to keep these data in memory. And I may also encounter performance problem to constantly persist these data to data store. So, would you guys please give me some advice? Am I missing some thing or there should be any technology/tricks that can be employed on GAE that can facilitate me to build such online game like this? Thanks. Phuong -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] JDP, get objects by id
I need get some objects by ID from datastore, but I'm not sure exsists every objects (some objects may was delete before my request). PersistenceManager.getObjectsById(...) throw exception if not objects exsists. GQL quote 30 keys in 'IN' query. Is exsists any other way to get objects by one query from program, if I don't sure in exsists every of it? -- 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] Datastore in task
Now i write import data into datastore and clean datastore. When I import data - i upload zip file to servlet, into servlet I unzip it and create some tasks for import data. First time, every task in first run can't access to datastore: 03-29 09:49AM 25.793 /ImportTask 500 10067ms 0cpu_ms 0kb AppEngine- Google; (+http://code.google.com/appengine) 0.1.0.2 - - [29/Mar/2010:09:49:35 -0700] POST /ImportTask HTTP/1.1 500 0 http://import.latest.tim-test-001.appspot.com/ImportTask; AppEngine-Google; (+http://code.google.com/appengine) import.latest.tim-test-001.appspot.com W 03-29 09:49AM 35.860 Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.html for more details. Yesterday I think that I overquote CPU/minute when start 3-4 threads of import data. Today i write clean servlet and run it in one thread. I have same. I read - free quota is 15 CPU minutes/minute. I have 1 thread of clean servlet: DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); for (String kind : kinds) { log(kind: + kind); Query query = new Query(kind); query.setKeysOnly(); query.addSort(__key__); int size; do { log(prepare query); PreparedQuery pq = ds.prepare(query); ArrayListKey keys = new ArrayListKey(max_ids); for (Entity e : pq.asIterable(withLimit(max_ids))) { keys.add(e.getKey()); } ds.delete(keys); size = keys.size(); log(delete: + size); count += size; } while (size 0); } out.println(Deleted all: + count); } catch (DeadlineExceededException ex) { Queue q = QueueFactory.getDefaultQueue(); q.add(url(/ Clean).method(TaskOptions.Method.GET).param(start, + count)); out.println(Deleted: + Integer.toString(count)); } finally { out.close(); } First time I start it by url and first created task have same problem as above. But task, which i create in task (when i have timeoute exception) haveno it problem. -- 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] Russian characters in SDK datastore viewer
I can't read it. I can read it by API, I can see it into app engine server datastore viewer, but in local datastore viewer i see ???. -- 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: Russian characters in SDK datastore viewer
I'm use Java SDK 1.3.2 On 31 мар, 01:55, Ikai L (Google) ika...@google.com wrote: Are you using Java or Python? Can you check to see if you are using 1.3.2? http://code.google.com/p/googleappengine/issues/detail?id=502 I've reproduced this using the Java SDK, but I want to check to see if it's also problematic in Python. On Mon, Mar 29, 2010 at 11:57 PM, Timofey Koolin timo...@koolin.ru wrote: I can't read it. I can read it by API, I can see it into app engine server datastore viewer, but in local datastore viewer i see ???. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Enginehttp://googleappengine.blogspot.com|http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: URLFetchService example
URL url = new URL(http://www.ya.ru;); InputStream strm = url.openStream(); InputStreamReader r = new InputStreamReader(strm); char[] charr = new char[1024]; int len = r.read(charr); String s = new String(charr, 0, len); On 25 фев, 12:04, kghate kgh...@gmail.com wrote: I am trying to get a simple URLFetchService example to work, here is the code. URL url = new URL(http://www.google.com;); URLFetchService urlFetchService = URLFetchServiceFactory.getURLFetchService(); HTTPRequest httpRequest = new HTTPRequest(url,HTTPMethod.GET); HTTPResponse resp = urlFetchService.fetch(httpRequest); System.out.println(resp.toString()); Getting a nullpointer in the fetch method java.lang.NullPointerException at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchService Impl.java: 31) What am I missing? Please help.. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Will a solution to the Java load latency come in Q2?
Hello, for fast first load applications for user I set shedule for get main page of my application every minute. On Feb 23, 6:30 pm, Locke locke2...@gmail.com wrote: I plan on going live with my app in Q2, however, I can't subject my users to App Engine's Java loading delays. I recall that there has been talk of giving paying users the ability to keep at least one instance of their Java apps hot at all times. What are the chances of such a solution becoming available by the end of Q2? If this solution or some other solution to this problem is unlikely to be available in the next few months, I will reluctantly have to begin porting my app to another platform. Anyone know the status of this issue? Any info on the topic is appreciated. 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: JPA still has the 1000 record limit in GAE 1.3.1?
I don't know about JPA, but with JDO you can use cursors now for simple get more than 1000 records. http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors It new new feauture http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes On Feb 15, 11:20 am, mjustin michael.jus...@gmx.net wrote: Thanks for your answer! My current code uses query.setFirstResult(n), is this still limited to 1000? Your link is rather old and covers Python, but I would like to use JPA with Java. Do I have to use JDO or will JPA drop the 1000 records limit later? Regards, On 15 Feb., 05:31, Timofey Koolin timo...@koolin.ru wrote: Offset get all records from datastore, than skip first n records. You can try to readhttp://code.google.com/appengine/articles/paging.html On Feb 15, 12:02 am, mjustin michael.jus...@gmx.net wrote: My application uses JPA and I see the same errors as in version 1.3.0 now. If I count records in a table which has more than 1000 entries, the result is 1000. If I try to start a Query at an offset 1000, this error occurs: Caused by: java.lang.IllegalArgumentException: offset may not be above 1000 at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(Datast oreApiHelper.java: 33) at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(Datastor eApiHelper.java: 60) at com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQuery Impl.java: 115) at com.google.appengine.api.datastore.PreparedQueryImpl.asQueryResultList(Prep aredQueryImpl.java: 75) at org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(Dat astoreQuery.java: 359) at org.datanucleus.store.appengine.query.DatastoreQuery.executeQuery(Datastore Query.java: 269) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(Datasto reQuery.java: 228) at org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.ja va: 77) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithMap(Query.java:1398) at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163) Does this mean only the native API and JDO can use more than 1000 records in a query? Regards, -- 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 Junit Test with JDO
Thanks, but error not repeated, when I re-create project. On Feb 13, 11:50 pm, Moritz mor...@cloudme.org wrote: Remove datanucleus-appengine-1.0.5.final.jar from your build path, but leave it in the WEB-INF/lib folder. On 13 Feb., 07:07, Timofey Koolin timo...@koolin.ru wrote: I use eclipse. I create new project for create Junit tests of my GAE application, add my gae application in JavaBuildPath/Project. Than i copy all jars from sdk to lib in my project and add all to build path. in constructor i create helper: helper = new LocalServiceTestHelper( new LocalDatastoreServiceTestConfig() ); in setUp method i do helper.setUp(); PersistenceManager pm = PMF.get().getPersistenceManager(); // - this line throw exception (stacktrace below) I tried create jdoconfig.xml - but have compile error - duplicate description. java.lang.ExceptionInInitializerError at ru.abc_software.horoscope.test.HoroscopePageTest.Empty(HoroscopePageTest.ja va: 35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod $1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable. java: 15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.j ava: 41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.ja va: 20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java: 28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java: 31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.ja va: 73) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.ja va: 46) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java: 28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java: 31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRe ference.java: 46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java: 38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestR unner.java: 467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestR unner.java: 683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner .java: 390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunne r.java: 197) Caused by: javax.jdo.JDOFatalInternalException: Unexpected exception caught. NestedThrowables: java.lang.reflect.InvocationTargetException at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOH elper.java: 1186) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: 803) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: 1086) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: 914) at ru.abc_software.horoscope.test.PMF.clinit(PMF.java:8) ... 25 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.jdo.JDOHelper$16.run(JDOHelper.java:1956) at java.security.AccessController.doPrivileged(Native Method) at javax.jdo.JDOHelper.invoke(JDOHelper.java:1951) at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOH elper.java: 1159) ... 29 more Caused by: org.datanucleus.exceptions.NucleusException: Plugin (Bundle) org.datanucleus.jpa is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL file:/C:/Users/Timofey.NovaBigBook-PC/Documents/Eclipse
[appengine-java] Re: JPA still has the 1000 record limit in GAE 1.3.1?
Offset get all records from datastore, than skip first n records. You can try to read http://code.google.com/appengine/articles/paging.html On Feb 15, 12:02 am, mjustin michael.jus...@gmx.net wrote: My application uses JPA and I see the same errors as in version 1.3.0 now. If I count records in a table which has more than 1000 entries, the result is 1000. If I try to start a Query at an offset 1000, this error occurs: Caused by: java.lang.IllegalArgumentException: offset may not be above 1000 at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(Datast oreApiHelper.java: 33) at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(Datastor eApiHelper.java: 60) at com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQuery Impl.java: 115) at com.google.appengine.api.datastore.PreparedQueryImpl.asQueryResultList(Prep aredQueryImpl.java: 75) at org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(Dat astoreQuery.java: 359) at org.datanucleus.store.appengine.query.DatastoreQuery.executeQuery(Datastore Query.java: 269) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(Datasto reQuery.java: 228) at org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.ja va: 77) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithMap(Query.java:1398) at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163) Does this mean only the native API and JDO can use more than 1000 records in a query? Regards, -- 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.