[appengine-java] Re: Why I encountered this error : The class java.lang.String is not persistable.
DataNucleus: OK. Jolam: how did you fix your 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.
Re: [appengine-java] log4j init fails
I have the default log4j.properties in WEB-INF/classes dir. but the warning always comes up. the file is visible because I can change the log level to ERROR to get rid of the warning. -aj On Fri, Feb 19, 2010 at 7:24 PM, Rusty Wright rwright.li...@gmail.comwrote: I think you can simply put the log4j.properties file in the WEB-INF/classes dir and you don't need any appengine-web.xml stuff for it. Log4j looks for its configuration file on the classpath which means it looks in WEB-INF/classes (and also in all of the jars in the lib directory). AJ Chen wrote: I have log4j config in appengine-web.xml, system-properties property name=java.util.logging.config.file value=WEB-INF/logging.properties/ property name=log4j.configuration value=file:WEB-INF/classes/log4j.properties/ property name=monitor.config.file value=WEB-INF/monitor.properties/ /system-properties but GAE still complains about it: log4j:WARN No appenders could be found for logger (DataNucleus.Connection). log4j:WARN Please initialize the log4j system properly. Is there anything else that should be set? thanks, -aj -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 0x2B | ~0x2b -- Hamlet -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- AJ Chen, PhD Chair, Semantic Web SIG, sdforum.org http://web2express.org twitter @web2express Palo Alto, CA, USA 650-283-4091 *Building social media monitoring pipeline, and connecting social customers to CRM* -- 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] How to query objects with criterias defined in child entities
On Wed, Mar 10, 2010 at 7:39 PM, John Patterson jdpatter...@gmail.com wrote: On 11 Mar 2010, at 03:40, Jeff Schnitzer wrote: That is an empty claim with no example or evidence. Every comparison we have see so far is cleaner and more readable in Twig. Nonsense. The only example that was cleaner and more readable in Twig was a single and extremely contrived case based on a pattern that nobody is actually using. And even that is no longer prettier in Twig. Readability is not even the most important issue here: Objectify model's dependence on low-level Keys means that *all* code that uses you data (the entire application) must also be dependent on the low-level datastore. Let's think for a minute why anyone cares if Key, Email, GeoPt, Link, etc shows up in higher levels of an application: portability. Unless you're working on Twig for other datastores, this entire line of thought is moot. If you use Twig for data access, you're stuck on GAE. If you use Objectify for data access, you're stuck on GAE. The only data access API that gives you any hope (tenuous as it is) of real portability is JDO/JPA. Without portability, all this talk of polluting the higher tiers of your application with datastore classes is a whole lot of religious claptrap. In my development with Objectify, I haven't found it necessary to use Key objects in the higher levels of my app - just at the level of DAOs. However, I do use GeoPt a lot. There are a lot of things that might change if I had to port away from GAE, and this is just one of them. Sure, some data access frameworks can help portability more than others, but if you are really concerned about moving off of GAE - you want JPA. This what is going on under the covers in Twig is suddenly the responsibility of the developer with Objectify. As pointed out above, this makes Objectify applications less portable. Hmmm. Except that what is going on under the covers in Twig requires Twig, and Twig is not portable. You seem to be making a pretty good case for JDO/JPA. The success of projects like Hibernate grew from the fact that users don't want to deal with implementation details in their business logic. The success of projects like Hibernate grew from the giant chasm between objects and relational databases. There were some solutions that did more and some solutions that did less. Hibernate did about the right amount of stuff and had what for the time was a fairly elegant API. It's not always the case that doing more is better - JPA won out over JDO. Even hibernate ended up throwing out some major features (anyone remember top level collections?) The trick will be threading the needle between features and complexity. You weigh features more heavily, I weigh simplicity more heavily. Oh come on! What is so difficult to understand here? Calling refresh(Object) gets the latest data from the datastore. Actually, it was quite confusing, and I'm not just being argumentative. Until you posted your delete example, it was not apparent that your entity POJOs have lifecycle state; a POJO in an entity graph might have been loaded from the database or it might be empty, despite having a valid key. Now it makes sense why you need a refresh() method. I don't like the idea of entities that look like User #1234 but don't have the data of User #1234. This feels like it has a lot of bug potential to me. Objectify has, basically, four methods: get(), put(), delete(), and query(). They work exactly the way you would expect. I wouldn't say that - why does Query extend QueryResultIterator? This is not at all expected. I could call offset() on your Query in the middle of iterating through its results... the API seems to suggest that is possible. Quite weird. You may be the only one confused by this, probably because you didn't read the documentation properly: Query extends QueryResultIterable, not QueryResultIterator. And yes, you can call offset(5), then iterator(), then call offset(10), and call iterator() again. Each iterator will iterate normally as you expect. Once again, this allows queries to be elegantly run like this: for (Car car: ofy.query(Car.class).filter(weight , 5000)) { doSomethingWith(car); } ...which, while not being a major bullet point, is at least an mild ergonomic win for Objectify. Twig adds quite a few API methods and the docs don't make it clear what they do. What are refresh(), update(), storeOrUpdate(), associate(), and disassociate()? Of course Twig has more API methods than Objectify - Objectify does not manage instance identity. Managing instance identity is not that hard. It's a simple @Id field, just like the @Id you are familiar with in JPA. Maybe an additional @Parent in the rare case you need one. Not that complicated. The code is generally a lot more descriptive and fluent which helps understanding more than depending on JavaDocs. As someone who has read your documentation with more
[appengine-java] Re: Why I encountered this error : The class java.lang.String is not persistable.
Actually i have encounter new problems...I will ask for help in a new post... On Mar 11, 4:01 pm, Ian Marshall ianmarshall...@gmail.com wrote: DataNucleus: OK. Jolam: how did you fix your 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]confusion about entities group and transaction.
I have defined two classes named TotalInformation and UrlInformation: TotalInformation: @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private int urlNumber; UrlInformation @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String url = new String(); @Persistent private String code = new String(); ___ Both have no reference to each other. I retrieve TotalInformation and make a key to create a UrlInformation in the same transaction and finally i store them like this : __ tx.begin(); code = UrlConverter.getStringByNumber(total.getUrlNumber()); total.setUrlNumber(total.getUrlNumber() + 1); KeyFactory.Builder keyBuilder = new KeyFactory.Builder(TotalInformation.class.getSimpleName(),PropertiesGetter.getProperty(administation.totalInfomation.id)); keyBuilder.addChild(UrlInformation.class.getSimpleName(), code); Key key = keyBuilder.getKey(); UrlInformation thisUrl = new UrlInformation(); thisUrl.setKey(key); // pm.makePersistent(thisUrl); tx.commit(); pm.close(); ___ the transaction didn't rollback which i suppose the two entities are in the same entities group and i found two entities in http:// localhost:/_ah/admin and found the two entities with the keys below respectively: TotalInformation: agpqaWFuZy1zZmdsciELEhBUb3RhbEluZm9ybWF0aW9uIgsxNTAxNzUwMjEyNQw UrlInformation: agpqaWFuZy1zZmdscjYLEhBUb3RhbEluZm9ybWF0aW9uIgsxNTAxNzUwMjEyNQwLEg5VcmxJbmZvcm1hdGlvbiIBMQw But when i create keys to retrieve UrlInformation and TotalInformation and i encounter : javax.jdo.JDOFatalUserException: Illegal argument NestedThrowables: java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction. found both Element { type: TotalInformation name: 15017502125 } and Element { type: UrlInformation name: d } -- 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: confusion about entities group and transaction.
What i'm gonna ask is how can i store two class with no reference to each other in a single transaction and how can i retrieve them , edit and store them in a single transaction. -- 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: Where can i specify my log file name in Google Web App ?
Thank you Ian Marshall, I want to log all diagnostic messages in a file by specify file name in Log4j.properties file as below: log4j.appender.myapp.file=C:/MyTestAppLogs.log but its not working... any idea ? Thanks, MallikarjunBK On Mar 11, 1:54 am, Ian Marshall ianmarshall...@gmail.com wrote: I use both files, located in: war\WEB-INF\classes\log4j.properties war\WEB-INF\classes\logging.properties In my appengine-web.xml file, I have the following extract for you: ?xml version=1.0 encoding=UTF-8? appengine-web-app xmlns=http://appengine.google.com/ns/1.0; system-properties property name=java.util.logging.config.file value=WEB-INF/classes/logging.properties / property name=log4j.configuration value=file:WEB-INF/classes/log4j.properties / /system-properties /appengine-web-app I remember that I had a problem where the two file names included capital letters, so reluctantly I made them both pure lower case! -- 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] Objectify - Twig - approaches to persistence
On 11 Mar 2010, at 16:27, Jeff Schnitzer wrote: On Wed, Mar 10, 2010 at 7:39 PM, John Patterson jdpatter...@gmail.com wrote: On 11 Mar 2010, at 03:40, Jeff Schnitzer wrote: That is an empty claim with no example or evidence. Every comparison we have see so far is cleaner and more readable in Twig. Nonsense. The only example that was cleaner and more readable in Twig was a single and extremely contrived case based on a pattern that nobody is actually using. And even that is no longer prettier in Twig. Well then, where are your examples? I responded to the edge cases you asked about with a simple example. Now its your turn to show me how Objectify would code the example I asked about. So wheres the code? Where is this clean Objectify code you claim is possible? The question is still waiting below Readability is not even the most important issue here: Objectify model's dependence on low-level Keys means that *all* code that uses you data (the entire application) must also be dependent on the low-level datastore. Let's think for a minute why anyone cares if Key, Email, GeoPt, Link, etc shows up in higher levels of an application: portability. Unless you're working on Twig for other datastores, this entire line of thought is moot. If you use Twig for data access, you're stuck on GAE. If you use Objectify for data access, you're stuck on GAE. You are still mixing the concepts of data model portability and data access layer (DAOs) portability. Of course the code to actually manipulate data uses a particular interface and is dependent on that interface. The only persistence framework I am aware of that approaches complete transparency is Terracotta. I never claimed that Twig code would run on other platforms. What I claimed was that the *data models* are not dependent on the datastore. Generally a lot of application code simply uses data without needing to persist changes - especially in webapps. All of this code can remain portable ... unless your data models are not portable. The only data access API that gives you any hope (tenuous as it is) of real portability is JDO/JPA. Are you having a laugh? After all your rants about how portability with JDO-GAE is impossible... that is really grasping at straws. I claim that Twig data models are more portable that JDO-GAE, JPA and Objectify data models. Why? Because they are pure POJOs with no low level datastore dependencies - simple. Yes you can run JDO on other platforms - but I do not claim that the data access layer is portable - although certainly neither is Objectify Without portability, all this talk of polluting the higher tiers of your application with datastore classes is a whole lot of religious claptrap. It is not important until you hit one of the many show-stoppers that these mailing lists are full of. Then it becomes a little more interesting. In my development with Objectify, I haven't found it necessary to use Key objects in the higher levels of my app - just at the level of DAOs. However, I do use GeoPt a lot. There are a lot of things that might change if I had to port away from GAE, and this is just one of them. Obviously a rather large one. The trick will be threading the needle between features and complexity. You weigh features more heavily, I weigh simplicity more heavily. In a system such as GAE which makes so much so hard productivity features are a great relief. No OR queries? Of course I value simplicity - but the whole idea of a framework is to push complexity from the user code into the framework. Objectify leaves too much too the developer for my liking. It is simple - I grant you that - but that makes app code more complex. Oh come on! What is so difficult to understand here? Calling refresh(Object) gets the latest data from the datastore. Actually, it was quite confusing, and I'm not just being argumentative. Until you posted your delete example, it was not apparent that your entity POJOs have lifecycle state; a POJO in an entity graph might have been loaded from the database or it might be empty, despite having a valid key. Now it makes sense why you need a refresh() method. It is covered in the docs. Activation is a central concept with Twig - modelled on Db4o. I don't like the idea of entities that look like User #1234 but don't have the data of User #1234. This feels like it has a lot of bug potential to me. All referenced objects are activated by default - the developer actually has to explicitly choose to use this feature as an optimisation so there are no surprises. Objectify has, basically, four methods: get(), put(), delete(), and query(). They work exactly the way you would expect. I wouldn't say that - why does Query extend QueryResultIterator? This is not at all expected. I could call offset() on your Query in the middle of iterating through its results...
[appengine-java] Re: confusion about entities group and transaction.
I think that the only way to do this is to have both of your instances in the same entity group. So, even though each instance will have no (direct) reference to each other, they will need to share an entity ancestor (which will ensure that your instances are in the same entity group (the same entity group as the common ancestor)). -- 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: Where can i specify my log file name in Google Web App ?
In fact, I have two log4j.properties files: one for my build environment and one for running GAE/J (either the development server on my computer or in the production (cloud) environment). In my earlier post I mentioned my running properties file only. BUILD ENVIRONEMNT EXTRACT - log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=nbproject/Build.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n log4j.category.DataNucleus=WARN, A1 PRODUCTION ENVIRONEMNT EXTRACT -- log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n log4j.category.DataNucleus=WARN, A1 Of course, our apps cannot write to file when running under GAE (either dev or production), hence my use of the console appender instead of the file appender. I know little about Log4J, but for your build environment you might care to alter the wording of your file appender line log4j.appender.myapp.file=C:/MyTestAppLogs.log to log4j.appender.myapp.File=C:/MyTestAppLogs.log but I do not know if Log4J is case sensitive like this. -- 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] Precompilation fails
Hi, I manage the Google App Engine module for the Play! java web framework (http://www.playframework.org). While generated applications run correctly on the local and production runtimes, the precompilation process always fail. It seems that any war generated by play cannot be precompiled (So for example this app: http://play-lists.appspot.com). It's true that we are doing a lot of very dirty hacks in play framework... But any chance to have a hint on why the precompilation process fail? This way I could try to find a fix. Thank you. Guillaume. -- 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: Not able to write string arrays in data store
Hi, Thanks for your response...I dont have my code with me right now..I will post it in a day or two. Meanwhile, do you have any example of handling two dimensional arrays into two separate lists of ArrayList? -Thanks Ganesh On Mar 10, 5:17 pm, Robert Lancer robert.lan...@gmail.com wrote: Just use two separate lists of ArrayListString and it should work fine. Also you have to test for null whenever you pull anything out of datastore, something like if null then return new ArrayListString(0) should work this case. On Mar 10, 4:28 pm, thierry Le conniat thlec...@euriware.fr wrote: Hello, how to do you retreive data , could you send jour java code ? On 10 mar, 17:28, Ganesh ganeshkumar.marimu...@gmail.com wrote: Hi, I am trying to store two dimensional string array in google data store. I was getting an exception saying this data type not supported. I tried changing the string array object to java.util.arraylist (gave serizable = 'true' option). This time I was able to write the data successfully. But when I tried to retrieve it, I am facing null pointer exception. Can any body help me with this? -Thanks Ganesh- 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: Not able to write string arrays in data store
I tried changing the string array object to java.util.arraylist (gave serizable = 'true' option). This time I was able to write the data successfully. But when I tried to retrieve it, I am facing null pointer exception. Perhaps if you actually posted the NPE+stack trace, and code used to retrieve it then someone could point out the 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] Cloud2db - JDBC driver for Google Android platform
Hi Everyone, Cloud2db is pleased to announce the availability of Cloud2db JDBC driver for Google Android platform. With this driver you will be able to access your Cloud2db instance from the Android applications using standard JDBC concepts. Please download the Cloud2db Server and JDBC driver from the following following link, http://cloud2db.appspot.com/website/download.html. Cloud2db provides a standards-based abstraction layer over Google Datastore (Bigtable). This product provides you with performance and scalability of GAE along with structure, standards and interoperability of RDBMS, SQL and JDBC. With Cloud2db, you will be able to manage your data on Google Datastore by using established concepts of RDBMS, SQL and JDBC, and thereby preserving your existing investments in tools, technologies, frameworks and skills. Here are Cloud2db features: Manage data on Google Datastore using familiar concepts of RDBMD, SQL . Referential integrity (Primary Keys, Foreign Keys) . Role Based Security . Joins (Inner Join, Left Outer Join, Theta Join, Cross Join) . Subqueries (Exists, Not Exists, In) . DDL DML . Transactions . ANSI SQL stored functions . Views . BLOB and CLOB support Use any JDBC compliant tools and frameworks in the market to interact with the Google Datastore. For example. . Squirrel SQL (database management) . Power Architect (data modeling) . Jasper Reports (reporting) . Hibernate (Object To Relational mapping) . All JDBC compliant tools Port exiting RDBMS instances to Google Datastore Please visit our website http://www.cloud2db.com and try out the free trial version of our product by downloading it at http://cloud2db.appspot.com/website/download.html. Please visit google group Cloud2db to share your feedback and thoughts. Sincerely, Sandeep Sathaye Founder and Chief Architect Cloud2db -- 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: elegant way of implementing sequence generator
Hi blake, could you give me simple example on how to use the @version, or any reference material? thanks! On Mar 9, 11:35 pm, Blake blakecaldw...@gmail.com wrote: You could also go with the sharded counter strategy. The more shards you have, the less the chance that you'll have a collision, and you'd use @Version for optimistic locking on each shard. On Mar 9, 7:18 am, legendlink gregc...@gmail.com wrote: Thanks for the reply. If memcache is used, how do I implement it so that the counter would always be updated and not be deleted? On Mar 6, 4:35 am, Ikai L (Google) ika...@google.com wrote: Have you looked into Memcache's INCR? http://code.google.com/appengine/docs/java/javadoc/com/google/appengi..., long) This'll do it atomically, but you run the risk of it being volatile, so you'll have to account for that in your client code. On Tue, Mar 2, 2010 at 11:40 PM, legendlink gregc...@gmail.com wrote: hi, i wanted to have a sequence generator that increments by x value everytime it generates a value. if i would create the sequence generator by using the datastore, it is likely that data contention would occurr if there is high access times. i have looked into the sample code of max ross in the google code repository (SequenceExamplesJDO.java) and think this is limited to increment by 1 only and not increment by x value. if sharding technique is used, my concern is that i might not get the right sequence. what is the best/elegant way of doing sequence generator that increments x value? -- 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. -- 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] 30 second error after commit transaction
Could someone confirm if my thinking is correct regarding the status of datastore if the 30 seconds timeout occurs in the timeline below? start of servlet ... some process ... transaction start ... --- a) 30 second timeout! some process ... --- b) 30 second timeout! commit transaction ... --- c) 30 second timeout! close persistence manager ... --- d) 30 second timeout! process ... --- e) 30 second timeout! end of servlet A) not committed B) not committed C) committed D) committed E) committed -- 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] log4j init fails
If you have your log4j.properties file at the root of your source tree, it should automatically be copied over to war/WEB-INF/classes whenever Eclipse performs a build of your project; you should not have to copy it over manually. I'm not sure why you're getting the error with regard to Datanucleus.Connection; I've added Don to this thread; he may have some insight into this. On Thu, Mar 11, 2010 at 3:33 AM, AJ Chen ajc...@web2express.org wrote: I have the default log4j.properties in WEB-INF/classes dir. but the warning always comes up. the file is visible because I can change the log level to ERROR to get rid of the warning. -aj On Fri, Feb 19, 2010 at 7:24 PM, Rusty Wright rwright.li...@gmail.comwrote: I think you can simply put the log4j.properties file in the WEB-INF/classes dir and you don't need any appengine-web.xml stuff for it. Log4j looks for its configuration file on the classpath which means it looks in WEB-INF/classes (and also in all of the jars in the lib directory). AJ Chen wrote: I have log4j config in appengine-web.xml, system-properties property name=java.util.logging.config.file value=WEB-INF/logging.properties/ property name=log4j.configuration value=file:WEB-INF/classes/log4j.properties/ property name=monitor.config.file value=WEB-INF/monitor.properties/ /system-properties but GAE still complains about it: log4j:WARN No appenders could be found for logger (DataNucleus.Connection). log4j:WARN Please initialize the log4j system properly. Is there anything else that should be set? thanks, -aj -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 0x2B | ~0x2b -- Hamlet -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- AJ Chen, PhD Chair, Semantic Web SIG, sdforum.org http://web2express.org twitter @web2express Palo Alto, CA, USA 650-283-4091 *Building social media monitoring pipeline, and connecting social customers to CRM* -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: App instance recycling and response times - is there solution?
I setup some pings of my add a few minutes ago, and I'm still seeing recycling :( My ping setup can't go lower than 60s intervals, so I have two running concurrently. Here's a sample of 20 log entries over 10 minutes, with . Three recyclings occur, and they happen less than 10s after a previous request. Really Google, you're killing my JVM after TEN SECONDS? And I get to pay you for the ton of CPU each startup uses? Sounds like the more recycling, the more profitable the App Engine becomes. - * 03-11 08:02AM 38.506 /?Pragma=no-cache 200 2158ms 2235cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 08:02AM 23.144 /?Pragma=no-cache 200 53ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 08:01AM 06.134 /?Pragma=no-cache 200 75ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 08:00AM 51.707 /?Pragma=no-cache 200 49ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 08:00AM 05.823 /?Pragma=no-cache 200 49ms 58cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:59AM 51.499 /?Pragma=no-cache 200 56ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:59AM 05.584 /?Pragma=no-cache 200 47ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:58AM 51.274 /?Pragma=no-cache 200 61ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:58AM 05.371 /?Pragma=no-cache 200 64ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:57AM 51.025 /?Pragma=no-cache 200 74ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) * 03-11 07:56AM 57.327 /?Pragma=no-cache 200 7835ms 2119cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:56AM 50.784 /?Pragma=no-cache 200 75ms 58cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:55AM 57.008 /?Pragma=no-cache 200 50ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) * 03-11 07:55AM 46.384 /?Pragma=no-cache 200 4250ms 2060cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:54AM 56.782 /?Pragma=no-cache 200 70ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:54AM 46.157 /?Pragma=no-cache 200 54ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:53AM 56.586 /?Pragma=no-cache 200 52ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:53AM 45.934 /?Pragma=no-cache 200 51ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:52AM 56.240 /?Pragma=no-cache 200 62ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:52AM 45.718 /?Pragma=no-cache 200 57ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) - On Jan 30, 11:02 pm, Alyxandor a.revolution.ultra.b...@gmail.com wrote: If you are experiencing failed requests on your long-running / requests, consider performing some kind of pre-warming procedure of your own... If you are getting timeout errors, Ping a do-nothing url, and wait for it to return before running the big job. If it's a big job, users should expect to wait anyway {and you should tell them they are waiting!}, so the ping ensures {almost} that a warm JVM is running in the server nearest said users, and then the big /request can {usually} avoid getting killed with extra spin up time. Very unlucky users would get a /ping on an old JVM, and /request a new one, but... Technology isn't perfect... YET! -- 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 exactly do the App Engine Logs work?
On Wed, Mar 10, 2010 at 8:05 PM, Spines kwste...@gmail.com wrote: Sorry, I don't think I really understood the task queue approach. To ensure no loss of data, would the task have to update in the datastore every time? And the benefit over just doing it directly in the servlet handler would be the faster response time to the user? Basically, yes. I think the memcache solution may be my best bet. I can tolerate some chance of loss of data. I'm wondering how likely loss of data would be? How often does the data get booted out? If I persist from memcache to datastore every 10 seconds would data loss be super rare? You would have to experiment with this as we don't make any guarantees, but I believe that memcache data generally survives much longer than 10 seconds of inactivity, yes. On Mar 10, 4:11 pm, Spines kwste...@gmail.com wrote: Thanks Don, I thought about the task queue, but that caps at being able to execute like 5 tasks per second right? So, as long as the log data doesn't get full before I download it then it would be fine? On Mar 10, 3:42 pm, Don Schwarz schwa...@google.com wrote: Yeah, those are diagnostic logs. They effectively go into a ring buffer per logging level, so the maximum data stored at any given time is capped. The more you log, the more frequently you would have to download the logs to avoid missing any. You would also be competing with log space with any other log messages generated by your application. What I would suggest instead is either to increment counters in memcache, and flush them to the datastore periodically if you need durability (I'm assuming you can tolerate some chance of data loss here). If you cannot tolerate any loss of data, then I would suggest enqueueing tasks to a task queue for each request that maintains a summary in memcache and/or the datastore. On Wed, Mar 10, 2010 at 4:59 PM, Spines kwste...@gmail.com wrote: I'm talking about the logs that get written when I call Logger.info(something). Basically this is what I'm thinking: I have certain data that needs to get written very often, but hardly ever needs to be read (stuff like what users view what pages of my site). The datastore is optimized for read efficiency. So, I want to output this data to the logs. I will have an offsite computer download these logs, do calculations on them, and upload the result of the calculations to the datastore. On Mar 10, 2:03 pm, Don Schwarz schwa...@google.com wrote: Are you talking about request logs or diagnostic logs? Although we conflate them a bit in both the Admin Console viewer and the appcfg command, but they are stored and tracked separately. On Wed, Mar 10, 2010 at 4:01 PM, Spines kwste...@gmail.com wrote: Hmm, that is my biggest concern, log reliability. Can someone from Google confirm whether or not I can rely on the logs having all of the log data? Or might certain entries just disappear? On Mar 10, 1:24 pm, thierry Le conniat thlec...@euriware.fr wrote: Hello, I think google log are stored in file. My experience about log reliability is that when the app is very strong working, not all the log are stored. It's confusing, but i can't not explain it. Bye On 10 mar, 22:04, Spines kwste...@gmail.com wrote: Where does Google store the logs when you do a Logging statement? Logging statements seem to be pretty fast, so it doesn't seem like they are stored in the datastore. How reliable are the logs? If I do a logging statement and it succeeds, is it pretty much guaranteed that it will show up in the logs? How much past history of logs is stored? The reason I'm interested in this is because I'm making a question and answer website, and I want to keep track of views by each unique logged in user to each question, and display the view count on the question page. So if 10 different users visit the question page 100 times, it still only counts as 10 unique views. I have an offsite computer that does background processing for my app. I'm planning to have this offsite computer download the logs about every 30 minutes, and calculate what the view count should be for each question based off of the logs. By doing this, I don't have to create a datastore entity for each different question each user views. What do you guys think? Does anyone see any problems with this? -- 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
[appengine-java] Re: elegant way of implementing sequence generator
could you give me simple example on how to use the @version, The DataNucleus docs define that, and much more http://www.datanucleus.org/products/accessplatform/jdo/orm/versioning.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: confusion about entities group and transaction.
It's the kind-hearted man Ian Marshall again. :) I have solved the problem mentioned above by setting the key of a class to be stored a key with common ancestor like u said. But there's one thing i think we should noticed that if we retrieve a entity by a key with no parents ,say we create it by KeyFactory using the key's name like: KeyFactory.createKey(a.class.getSimpleName(),name); it can still be retrieve but it seems that the app engine don't recognize it a entity in same entity group with others.That is to say, we can't manipulate it with other entites that is in the same entity group in the same transaction. but if we create a key like this: KeyFactory.createKey(parents.class.getSimpleName,a.class.getSimpleName(),name); Everything's alright. -- 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] log4j init fails
yes, log4j.properties is copied by the build. the app uses it. the warning message is weird. thanks. On Thu, Mar 11, 2010 at 8:10 AM, Rajeev Dayal rda...@google.com wrote: If you have your log4j.properties file at the root of your source tree, it should automatically be copied over to war/WEB-INF/classes whenever Eclipse performs a build of your project; you should not have to copy it over manually. I'm not sure why you're getting the error with regard to Datanucleus.Connection; I've added Don to this thread; he may have some insight into this. On Thu, Mar 11, 2010 at 3:33 AM, AJ Chen ajc...@web2express.org wrote: I have the default log4j.properties in WEB-INF/classes dir. but the warning always comes up. the file is visible because I can change the log level to ERROR to get rid of the warning. -aj On Fri, Feb 19, 2010 at 7:24 PM, Rusty Wright rwright.li...@gmail.comwrote: I think you can simply put the log4j.properties file in the WEB-INF/classes dir and you don't need any appengine-web.xml stuff for it. Log4j looks for its configuration file on the classpath which means it looks in WEB-INF/classes (and also in all of the jars in the lib directory). AJ Chen wrote: I have log4j config in appengine-web.xml, system-properties property name=java.util.logging.config.file value=WEB-INF/logging.properties/ property name=log4j.configuration value=file:WEB-INF/classes/log4j.properties/ property name=monitor.config.file value=WEB-INF/monitor.properties/ /system-properties but GAE still complains about it: log4j:WARN No appenders could be found for logger (DataNucleus.Connection). log4j:WARN Please initialize the log4j system properly. Is there anything else that should be set? thanks, -aj -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 0x2B | ~0x2b -- Hamlet -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- AJ Chen, PhD Chair, Semantic Web SIG, sdforum.org http://web2express.org twitter @web2express Palo Alto, CA, USA 650-283-4091 *Building social media monitoring pipeline, and connecting social customers to CRM* -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- AJ Chen, PhD Chair, Semantic Web SIG, sdforum.org http://web2express.org twitter @web2express Palo Alto, CA, USA 650-283-4091 *Building social media monitoring pipeline, and connecting social customers to CRM* -- 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: App instance recycling and response times - is there solution?
Can you respond privately with your app id? On Thu, Mar 11, 2010 at 10:10 AM, James jamesk...@gmail.com wrote: I setup some pings of my add a few minutes ago, and I'm still seeing recycling :( My ping setup can't go lower than 60s intervals, so I have two running concurrently. Here's a sample of 20 log entries over 10 minutes, with . Three recyclings occur, and they happen less than 10s after a previous request. Really Google, you're killing my JVM after TEN SECONDS? And I get to pay you for the ton of CPU each startup uses? Sounds like the more recycling, the more profitable the App Engine becomes. - * 03-11 08:02AM 38.506 /?Pragma=no-cache 200 2158ms 2235cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 08:02AM 23.144 /?Pragma=no-cache 200 53ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 08:01AM 06.134 /?Pragma=no-cache 200 75ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 08:00AM 51.707 /?Pragma=no-cache 200 49ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 08:00AM 05.823 /?Pragma=no-cache 200 49ms 58cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:59AM 51.499 /?Pragma=no-cache 200 56ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:59AM 05.584 /?Pragma=no-cache 200 47ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:58AM 51.274 /?Pragma=no-cache 200 61ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:58AM 05.371 /?Pragma=no-cache 200 64ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:57AM 51.025 /?Pragma=no-cache 200 74ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) * 03-11 07:56AM 57.327 /?Pragma=no-cache 200 7835ms 2119cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:56AM 50.784 /?Pragma=no-cache 200 75ms 58cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:55AM 57.008 /?Pragma=no-cache 200 50ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) * 03-11 07:55AM 46.384 /?Pragma=no-cache 200 4250ms 2060cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:54AM 56.782 /?Pragma=no-cache 200 70ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:54AM 46.157 /?Pragma=no-cache 200 54ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:53AM 56.586 /?Pragma=no-cache 200 52ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:53AM 45.934 /?Pragma=no-cache 200 51ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:52AM 56.240 /?Pragma=no-cache 200 62ms 38cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) 03-11 07:52AM 45.718 /?Pragma=no-cache 200 57ms 19cpu_ms 0kb Site 24 X 7 RPT-HTTPClient/0.3-3E,gzip(gfe) - On Jan 30, 11:02 pm, Alyxandor a.revolution.ultra.b...@gmail.com wrote: If you are experiencing failed requests on your long-running / requests, consider performing some kind of pre-warming procedure of your own... If you are getting timeout errors, Ping a do-nothing url, and wait for it to return before running the big job. If it's a big job, users should expect to wait anyway {and you should tell them they are waiting!}, so the ping ensures {almost} that a warm JVM is running in the server nearest said users, and then the big /request can {usually} avoid getting killed with extra spin up time. Very unlucky users would get a /ping on an old JVM, and /request a new one, but... Technology isn't perfect... YET! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Not able to write string arrays in data store
Setting: ListString arrayDim1 = new ArrayListString(); ListString arrayDim2 = new ArrayListString(); entity.setUnindexedProperty(ArrayDim1, arrayDim1 ); entity.setUnindexedProperty(ArrayDim2, arrayDim2 ); Unless your looking to run queries against the lists use the setUnindexedProperty. Getting: ListString arrayDim1 = (ListString) entity.getProperty(ArrayDim1); ListString arrayDim2 = (ListString) entity.getProperty(ArrayDim2); if (arrayDim1 != null) if(arrayDim2 != null) On Mar 11, 9:41 am, Ganesh ganeshkumar.marimu...@gmail.com wrote: Hi, Thanks for your response...I dont have my code with me right now..I will post it in a day or two. Meanwhile, do you have any example of handling two dimensional arrays into two separate lists of ArrayList? -Thanks Ganesh On Mar 10, 5:17 pm, Robert Lancer robert.lan...@gmail.com wrote: Just use two separate lists of ArrayListString and it should work fine. Also you have to test for null whenever you pull anything out of datastore, something like if null then return new ArrayListString(0) should work this case. On Mar 10, 4:28 pm, thierry Le conniat thlec...@euriware.fr wrote: Hello, how to do you retreive data , could you send jour java code ? On 10 mar, 17:28, Ganesh ganeshkumar.marimu...@gmail.com wrote: Hi, I am trying to store two dimensional string array in google data store. I was getting an exception saying this data type not supported. I tried changing the string array object to java.util.arraylist (gave serizable = 'true' option). This time I was able to write the data successfully. But when I tried to retrieve it, I am facing null pointer exception. Can any body help me with this? -Thanks Ganesh- 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: Objectify - Twig - approaches to persistence
I've recently converted from JDO to Twig. I've been able to remove an optimization hack that queried the datastore every 15 minutes to cache data from a 1+ minute operation. I can now have end users execute essentially that same logic in real time. Have not tried Objectify so I can't comment on the comparison. From a framework perspective I'm in the camp of give me an easy and clean way to do what I do 80% of the time, and a low-level way to do anything else I need to do. -Bob -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Unable to replace JPACallbackHandler
I'm attempting to build a simple Java app, but as soon as I call pm.makePersistent( entity ) I get this error. I've only seen a couple other instances of this problem (here's one: http://groups.google.com/group/google-appengine-java/browse_thread/thread/ec3beda8fbd9c154 ). I don't believe this is an issue with the old datanucleus JAR on the classpath; here's my WAR's lib dir: appengine-api-1.0-sdk-1.3.1.jar datanucleus-appengine-1.0.5.final.jar datanucleus-core-1.1.5.jar datanucleus-jpa-1.1.5.jar geronimo-jpa_3.0_spec-1.1.1.jar jdo2-api-2.3-eb.jar jta-1.1.jar jython-2.5.0.jar slf4j-api-1.5.11.jar slf4j-jdk14-1.5.11.jar standard-1.1.2.jar Other details are here: http://code.google.com/p/maven-gae-plugin/issues/detail?id=49colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Version%20Summary I'm unable to determine if this is a maven plugin problem or not at this point. Any help is appreciated -- thanks. -Tom -- 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] Equality operator with range uery not working properly
Hi All, I am facing problem with a query when i am adding filter with equality operator (== set) and providing range, it gives all the records. Please help me. Thanks, Abhi -- 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: Equality operator with range uery not working properly
when i am adding filter with equality operator (== set) and providing range, it gives all the records. You don't quote the query, nor the query mechanism (local API, JDO, JPA, who knows what) so am doubting you will get a reply without such infos -- 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] Newwwwbie
Quick thing to try: run the server as Debug and not Run. This allows for hot class reloading. On Thu, Mar 11, 2010 at 12:27 AM, Thanks in Advance mikeashie...@gmail.com wrote: I started at: http://code.google.com/appengine/docs/java/gettingstarted/usingusers.html but am laughably stuck at To allow the user to sign out, provide a link to the sign-out screen, generated by the method createLogoutURL(). despite looking through the documentation at: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/UserService.html Also, I can't seem to get my Eclipse/Java application to re-compile/ update without restarting the server. Obviously I am new to Java/GAE but would be really appreciative of help in even how to read the documentation etc. Suggestions of Java/Eclipse basic tutorial or references would be great too. 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. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Unable to upload app: Error posting to URL:
Yes, you will have to specify your proxy settings. On Tue, Mar 9, 2010 at 8:32 AM, WillSpecht willspe...@gmail.com wrote: I am getting the following error when trying to upload my app to app engine. What does the 302 Redirected mean? I am behind a proxy could this be part of the problem? Error Tue Mar 09 11:12:47 EST 2010 Unable to upload app: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id=black3liveversion=1302 Redirected See the deployment console for more details com.google.appengine.tools.admin.AdminException: Unable to upload app: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id=black3liveversion=1; 302 Redirected at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java: 59) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java: 271) at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java: 148) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java: 38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.io.IOException: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id=black3liveversion=1; 302 Redirected at com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java: 143) at com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java: 81) at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java: 415) at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java: 229) at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java: 98) at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java: 53) -- 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. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Simple query
The dev appserver is a simulator, not a true emulator. It'll run much slower locally than in production because in production Google uses BigTable, scalable email service, scalable XMPP, scalable task executor, etc. On a side note, this is the lesser of two evils, anyway. Anyone that has done iPhone development knows that the simulator runs FASTER in development that it does on a real device. As you can tell this leads to problems ... On Thu, Mar 11, 2010 at 2:03 PM, Karel Alvarez kalvar...@gmail.com wrote: wow!, seriously? is this in the docs?? I don't recall ever reading about the dev server being significantly slower than production, for only one user, one request? No, I don't have the code in production, I would not put a code in production that I know for sure (now I know better) is not going to perform under 30 secs... I will post comments when I move this to production and give it a try there... I will take time to collect the data from production... thanks for replying!, was about to migrate the whole think to .net..., it is slow, but consistent :-) On Thu, Mar 11, 2010 at 4:49 PM, Ikai L (Google) ika...@google.com wrote: Oh, this is slow locally? Yes, that makes sense. Our local datastore stub isn't meant to run fast. We're thinking of replacing the flatfile stub with SQLite, which would mitigate the pain slightly. How does it run in production? On Thu, Mar 11, 2010 at 1:25 PM, Karel Alvarez kalvar...@gmail.com wrote: what kind of benchmarking you need? I could send you the local_db.bin file? and the code, and you can debug it line by line, it is pretty ovbious when that one line takes minutes to run... thanks! Karel On Thu, Mar 11, 2010 at 3:16 PM, Ikai L (Google) ika...@google.com wrote: This shouldn't take that long to run. Can you post any other code or benchmarking code? On Sun, Mar 7, 2010 at 6:33 PM, Karel Alvarez kalvar...@gmail.com wrote: Hi guy, I hate to bother everybody again. I have a ver simple class, some fields, and an String primary key. One of the fields lastTimeIndexed is a date. I am trying to get the max value for it, the folowing method working fine upto 3k records, but now I added more, and it takes minutes to run. I have the autoGenerate flag set to true in the datastore-indexes.xml, and also the datastore-indexes-auto.xml file... here is the code, what is wrong with it?? can anybody think of a better way of doing this?? public Date getLastDate() { Date lastDate = null; PersistenceManager pm = getPersistenceManager(); Query query = pm.newQuery(IndexEntry.class); query.setOrdering(lastTimeIndexed desc); query.setRange(0, 1); query.setUnique(true); try { IndexEntry entries = (IndexEntry) query.execute(); if (entries != null) { lastDate = entries.getLastTimeIndexed(); } } finally { query.closeAll(); } return lastDate; } thanks Karel -- 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. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at
[appengine-java] How to delete all entities of a kind with the datastore viewer
I'm only able to delete 20 entities at a time, I have over 500 entities of a certain kind. Is there a way I can delete them all from the admin console? -- 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] Objectify - Twig - approaches to persistence
I'll try to ignore the blatent trolls. But you want things easier to do in Objectify than Twig, so here's a few: - How, in Twig, do you rename a field? Objectify lets you import data from a variety of historical formats; as you load and save data it will naturally be transformed in format: class Person { @Id Long id; int age; @AlsoLoad(name) String fullName; } Now, assume that the user has queries like: QueryPerson q = ofy.query(Person.class).filter(age , 65); Does this query still work in your system? If so: After a few renames, how many queries will you be running? Can you do batch gets on their ids? I mean, after you implement batch gets, of course. Versions are an ugly solution to this problem and they make a giant mess out of the datastore. - How, in Twig, do you retire an Enum value? class Car { @Id Long id; int year; Color color; public void migrateColor(@AlsoLoad(color) value) { if (AQUA.equals(value)) color = Color.BLUE; else color = Color.valueOf(value); } } - How, in Twig, do you make an entity cached? If it's in your docs, it is not easy to find. The Objectify version: @Cached(expirationSeconds=600) // optional expiration class Person { ... } - How, in Twig, do you load a variety of different objects in parallel? MapKeyObject, Object result = ofy.get( new KeyCar(Car.class, carId), new KeyPerson(Person.class, personId), new KeyPlant(Plant.class, plantId)); - Usability, performance and maintainability are the strengths of Twig I would prefer to focus on. All I seem to see you focusing on is OR, the bizarre notion that addFilter() is somehow more maintainable than filter(), and an even stranger notion that someone will be confused by iterable queries. I don't want to knock the OR feature, but it's hardly the must-have feature you make it out to be. In the GAE issues list, OR support doesn't even make the first two pages, ranking it somewhere below Erlang and TCL support. I couldn't even find an issue for it. Obviously there are a *lot* of people building applications on GAE without OR in the framework, and they don't seem to be complaining too loudly about it. Maybe you're right, and we'll see a giant land rush for OR support. Except that Twig has supported OR queries for quite some time, and it still hasn't been getting traction. You might very well have something with parallel queries. As with all asynchronous code, they come at a cost of maintainability, but for some - maybe even many - applications, parallel queries could be a game changer. Rest assured, we will be watching. I don't deny that the developer could hit an initialized object. But given that they have to explicitly turn on this feature I think you are over-stating the danger. The advantages are huge - POJOs and cleaner code. I'm simply offering you the lessons that others have learned developing a highly analogous feature (proxies) in Hibernate. It isn't that proxies aren't useful, it's that they get screwed up a lot. As someone that has done a lot of work with Hibernate proxies, I can tell you firsthand that they can be very difficult to get right in a complicated schema. And hollow entities which nominally work but return invalid data will be worse. Again, it is not my intention to say this feature is inherently wrong or bad - but that it's not the great revolution that you make it out to be. It comes with a cost which the Objectify developers are not currently willing to pay. Yep. Objectify entities are plain, boring POJOs that work just like every other Java object. You can load them, clone them, save them, serialize them in and out, whatever. There is no magic. I would hardly call an object with such restrictions a POJO. You seem to have an odd definition of Plain Old Java Object. POJOs can be copied, created, cloned, whatever. You can have two of them in memory with the same id. This is actually pretty core to the philosophy of Objectify: We hate magic. We're pretty resistant to features that are not transparent, and when we do implement features that are magical (like @Embedded), we document the hell out of it. Hollow, stateful entities with lifecycles are pretty magical. Cascading loads and saves are pretty magical. POJOs and Keys are simple. My real world application is not possible with Objectify!! It uses OR queries executed in parallel. [...much other conversation...] OR's are essential - batch gets are a trivial feature that will be added with the load command. Essential? So all those applications deployed on GAE right now (including mine) don't exist? Jeff -- 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
[appengine-java] Re: datanucleus enhancer keeps running
i tried using gae sdk 1.3.1 but still got enhancer looping. it seems to happen when i include spring 3.x libs i dunno giving up and going for ant task. -lp On Mar 3, 1:43 am, Rajeev Dayal rda...@google.com wrote: Seehttp://code.google.com/p/googleappengine/issues/detail?id=2115. This may be the issue that you're having. It was recently fixed, and a version of GPE with the fix is forthcoming. On Thu, Feb 25, 2010 at 1:57 PM, Steve Pritchard steve...@gmail.com wrote: On Feb 25, 6:39 am, haole mejoe...@gmail.com wrote: i'm using eclipse 3.5.1, GPE 3.5 (1.2.0.v200912062003), GAE 1.3.1.v201002101412, GWT 2.0.3.v201002191036 datanucleusenhancer continuously runs over and over again temporary workaround: turn off build automatically feature in eclipse I have several projects with a dependency hierarchy. I found the enhancer to be fragile and it often would not enhance the classes. I had to do a 'clean' to make it happen. I could not find the pattern to when it failed to enhance. It never looped on me so you may be seeing a different problem. About 3 weeks ago I had had enough and turned off the Enhancer builder (the plugin yelled at me). In its place I added an ant task to do the enhancement. I derived the ant task statements from the Datanucleus site. Since that time things have been very stable and the enhancer always finishes its job. This is the essence of the ant task: !-- -- !-- T A S K D E F S -- !-- -- taskdef name=enhance classname=com.google.appengine.tools.enhancer.EnhancerTask classpath pathelement path=${appengine.tools.classpath}/ pathelement path=${appengine.tools.lib}/ /classpath /taskdef !-- -- !-- T A R G E T S -- !-- -- target name=enhance.cls description=Performs Datnucleus JDO enhancement on compiled data classes. !-- echo message= path ${appengine.tools.classpath}/ -- !-- echo message= fileset ${proj.dir.gen.cls}/ -- enhance failonerror=true verbose=false classpath pathelement path=${appengine.tools.classpath}/ fileset dir=${proj.dir.war.lib} includes=*.jar/ pathelement path=${proj.dir.gen.cls}/ /classpath fileset dir=${proj.dir.gen.cls} includes=**/*.class/ /enhance /target target name=enhance.war description=Performs Datnucleus JDO enhancement on war classes. !-- echo message= path ${appengine.tools.classpath}/ -- !-- echo message= fileset ${proj.dir.gen.cls}/ -- enhance failonerror=true verbose=false classpath pathelement path=${appengine.tools.classpath}/ fileset dir=${proj.dir.war.lib} includes=*.jar/ pathelement path=${proj.dir.war.cls}/ /classpath fileset dir=${proj.dir.war.cls} includes=**/*.class/ /enhance /target It may be worth a try. Steve -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How do I write data in my Google App Engine Datastore to com.google.appengine.api.datastore.Text
Lloyd, String reallyLong = It was the best of times, it was the worst of times. (...) ..; Text myText = new Text(reallyLong); I don't understand your reference to setMethod(). Cheers! On Mar 10, 10:53 pm, Lloyd cled...@gmail.com wrote: I have persistent object, with a string property that often is over 500 charachters. Google App Engine says I need to save it as a com.google.appengine.api.datastore.Text. How do I either convert a String type to a com.google.appengine.api.datastore.Text type so I can use a setMethod() on the property, or otherwise get my long sting data into that persistent value? -- 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: Not able to write string arrays in data store
This is the class which I wanted to write into datastore: import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import java.util.List; import java.util.Arrays; import java.util.ArrayList; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Question { @PrimaryKey @Persistent private String Pid; @Persistent public ListObject Cellval; public void setQuestion(String progid, String[][] cellval) { this.Pid = progid; this.Cellval = new ArrayListObject(cellval.length); for(int i = 0; i cellval.length; i++) { ArrayListString Temp2 = new ArrayListString(Arrays.asList(cellval[i])); this.Cellval.add(Temp2); } } public Question() { } public void setPid(String pid) { this.Pid = pid; } public String getPid() { return(this.Pid); } public String[][] getCellval() { String[][] tempstr = new String[20][20]; for(int i = 0; i this.Cellval.size();i++) { tempstr[i+1] = (String[]) ((ArrayList)this.Cellval.get(i)).toArray(); } return tempstr; } } I write it using below mentioned lines from a different class: public void writeQuestion(Question Q1) { PersistenceManager pm = PMF.get().getPersistenceManager(); try { pm.makePersistent(Q1); } finally { pm.close(); } } I am getting the below mentioned exception while executing this 'INSERT' action: java.lang.IllegalArgumentException: java.util.ArrayList is not a supported property type. at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedSingleValue(DataTypeUtils.java: 114) at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java: 99) at com.google.appengine.api.datastore.Entity.setProperty(Entity.java: 257) at org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField(DatastoreFieldManager.java: 757) at org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java: 1011) at com.cword.proj.Question.jdoProvideField(Question.java) at com.cword.proj.Question.jdoProvideFields(Question.java) at org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl.java: 2597) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java: 180) at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java: 3067) at org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImpl.java: 3043) at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java: 1258) at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java: 1135) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java: 668) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java: 693) at com.cword.proj.AccessQuestions.writeQuestion(AccessQuestions.java: 80) at org.apache.jsp.Temp_jsp._jspService(Temp_jsp.java:111) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access $101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet $2.run(PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java: 57) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 360) at
[appengine-java] Cryptography on App Engine
Anyone know of a reliable Java library for cryptography that works on the app engine? I want to encrypt with AES. -- 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: Reporting on GAE in Java
Update: This website (http://www.jscriptive.org/2009/08/jasperreports-and- google-appengine.html) appears to confirm that it's a real issue rather than simply something I've done wrong or overlooked. This website (http://code.google.com/p/g2-report-engine/wiki/ AppEngineSupport) seems to be a basic reporting tool that's specifically designed to work with GAE/J, albeit without the support of report building tools such as JasperReports' iReport. I'm still on the lookout for alternative reporting solutions if anyone can help me out? Cheers, David -- 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: Cryptography on App Engine
I think bouncy castle is a good library to use, does anyone know if it works on the app engine? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Objectify - Twig - approaches to persistence
On 12 Mar 2010, at 05:45, Jeff Schnitzer wrote: How, in Twig, do you rename a field? I'm glad you brought this up. I've found simple renames are better handled at the low level - no need to rehydrate them into instances just to rename a property. But for typesafe changes large or small Twig supports data migration in a much safer, more flexible way than Objectify. Read on for details. Objectify lets you import data from a variety of historical formats; as you load and save data it will naturally be transformed in format: class Person { @Id Long id; int age; @AlsoLoad(name) String fullName; } Cool, the @AlsoLoad is quite a neat feature. Although very limited to simple naming changes and nothing structural. All this is based on a dangerous assumption that you can modify live data in place. Hardly bullet proof. The Twig solution is to create a new version of the type (v2) and process your changes while leaving the live data completely isolated and safe. Then after you have tested your changes you bump up the version number of your live app. So basically: 1 - Create your new class PersonNew and set its version to 2 @Version(2) class PersonNew { int age; String fullName; } 2 - Configure the Kind name to be the same e.g. P (short kind names save DS space) 3 - Load your old Person instances and for each store a new PersonNew instance. Your data is now upgraded. 4 - Now you can just replace Person with PersonNew in your code and deploy a new version. 5 - Test the version. This crucial step is not possible with Objectifies solution. 6 - Only when you are happy your changes are correct make the new version live. The new data version will be used and you can delete your old data when you want. So you see the Twig method of data migration is much safer than Objectifies. It has the following advantages: 1 - You don't eve have a half-updated schema 2 - Tt works for major structural changes rather than just trivial field renames. 3 - You can test the new data structure before going live 4 - You can revert back to you old data structure The versions remain completely separate. Modifying live data in place gives me heart pains. Now, assume that the user has queries like: QueryPerson q = ofy.query(Person.class).filter(age , 65); Does this query still work in your system? If so: After a few renames, how many queries will you be running? Can you do batch gets on their ids? I mean, after you implement batch gets, of course What is with your obsession with batch gets? I understand they are central in Objectify because you are always loading keys. As I said already - even though this is not as essential in Twig it will be added to a new load command. Versions are an ugly solution to this problem and they make a giant mess out of the datastore. I certainly wouldn't feel comfortable re-factoring my live data without testing it. Having a new version in the datastore is a lot safer than modifying in place How, in Twig, do you make an entity cached? If it's in your docs, it is not easy to find. The Objectify version: Oops I didn't post the CookBook page in the end. Rest assured it is a trivial addition and I'll update the docs. It is also often better to cache above the data layer - hardly the killer feature you claim. Maybe you're right, and we'll see a giant land rush for OR support. Except that Twig has supported OR queries for quite some time, and it still hasn't been getting traction. No, ORs were just added last week :) Again, it is not my intention to say this feature is inherently wrong or bad - but that it's not the great revolution that you make it out to be. It comes with a cost which the Objectify developers are not currently willing to pay. I don't blame you. It was a lot of effort to get right and it works very elegantly without the need for bytecode enhancement or dynamic proxies. You seem to have an odd definition of Plain Old Java Object. POJOs can be copied, created, cloned, whatever. You can have two of them in memory with the same id. Of course, but a POJO is not something that comes with a list of requirements. I guess the level of plainess can vary :) This is actually pretty core to the philosophy of Objectify: We hate magic. We're pretty resistant to features that are not transparent, and when we do implement features that are magical (like @Embedded), we document the hell out of it. I think you hit the nail on the head there Jeff. This is the key difference in philosophies I think. Objectify prefers to keep itself simple even if the developer needs to do more work. Twig prefers to move complexity into the framework - at the cost of making the framework more complex internally (the API remains simple). A example of this is Twigs feature: command.ensureUniqueKey()
Re: [appengine-java] what if I hit memory limit ?
I've also put the source for my layered cache here: http://code.google.com/p/stick-cache/ You basically have one interface and 3 implementations: memcache, datastore, in-memory (LRU ReadWrite locks) One quite handy thing it does is handle blocking for expensive items. You can pass a Callable like this: cache.value(myKey, callable); If the value exists, return it. If not, then build it but block so other threads don't try to build it at the same time. Once it is done update all levels of the cache. Hope this helps On 11 Mar 2010, at 03:52, Don Schwarz wrote: To pick one at random: http://commons.apache.org/collections/apidocs/org/apache/commons/collections/map/LRUMap.html On Wed, Mar 10, 2010 at 11:08 AM, Prashant Gupta nextprash...@gmail.com wrote: Thanks Don for clarification. 100MB seems sufficient for me. Please suggest me a library for LRU caching implementation. -- 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-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] How to delete all entities of a kind with the datastore viewer
in the admin console:clike the next 20 entity,then change the brower's location.href set *size=200* and *offset=0*, enter^ ^ The offset's max is *1000* Good luck! 2010/3/12 Spines kwste...@gmail.com I'm only able to delete 20 entities at a time, I have over 500 entities of a certain kind. Is there a way I can delete them all from the admin console? -- 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] Objectify - Twig - approaches to persistence
On 12 Mar 2010, at 13:01, Scott Hernandez wrote: We have a different idea about live systems and managing upgrades/deployments. To answer the question below, you can always upgrade the data in place because you will always need a way to load that data into the current object representation. It just may be that you need to take the system offline to migrate the data. In my app taking the system off-line while re-processing the data is not an option. The actual reprocessing can take days. I see your point though. My data is mainly static so I don't have the issues you describe of keeping the new version in sync with the live version. However, I can think of several solutions to this while still having the safety advantage of independent tables in the datastore. The simple way would be to, during the migration period, create both a Person and a PersonNew whenever a user makes an edit. Another way would be to do this transparently by creating a simple forked translator that stored the Person as two Entities instead of one. I won't go into details but it is certainly not a major extension. I would probably go for the first method if it was just for my app - but this is the kind of feature that could be pushed into the framework to make it easier for others to benefit too. The versions remain completely separate. Modifying live data in place gives me heart pains. Duplicating data (during upgrades) is unacceptable, for my app. It may be safer to leave the old data, but it is not always possible. There is no maximum stored data on App Engine. If you delete the data after one day is that still a problem? I have a *lot* of data, that was costly to generate (both in terms of network and cpu) and to store. Jeff, and others on the Objectify list, have spent a lot of time working on a solution with the goal of keeping the app up during an upgrade (in simple upgrades), without needing to migrate all the existing data first, which would require downtime. Ok I understand. But that is a big trade-off - saving a day or two worth of storage costs in exchange for testability, ability-to-revert and the peace of mind that a coding error might corrupt your live data. If the documentation was *very* clear about this maybe, but as Jeff said, Hibernates biggest complaint was from new users who got LazyInit exceptions. This is the same thing you have created, without the benefit of having an exception. You may just get passed an instance of an uninitialized object if you aren't careful. Seems we have both claimed that in Objectify and Twig a careless user could delete their own data. At the end of the day, you can never guard against that completely in either framework. That still does not mean that object activation is not an elegant solution to the potential problem of loading too much data. But keep in mind that this is not on by default - by default all data will be activated. I expect that most apps will not even use this feature but it is there as an optimisation if needed. 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. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] appcfg.sh not uploading new jars
Hi, I've uploaded my app numerous times without any problems. But now when I add a new jars to the WEB-INF/lib dir and then run appcfg.sh it says 40% Uploading 0 files.. I know for a fact these jars have never been uploaded as part of this app before. And when I run the app I get a ClassNotFoundException because it's looking for a class inside one of the new jars. The jars i'm uploading are under 10MB and i'm running appcfg.sh on a mac. Any help would be much appreciated. Thanks Josh -- 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.