[appengine-java] Stopping a dev server from ant
Is there a way to stop an dev server from ant? I am trying to start a dev server in ant, and in parallel run a set of unit tests, then stop the dev server. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[appengine-java] how to use Multi-parameter in Query
I have a problem with javax.jdo.Query ,how to use Multi-parameter in Query ,think you! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[appengine-java] i have create a gwt project ,now when deploy the project with gae ,some problem has appear
I have a javabean like : package com.icsc.zzjj.client.bean; import java.io.Serializable; import java.lang.Float; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class EmailBean implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String recMail; @Persistent private String sendMail; @Persistent private String sendDate; @Persistent private String sendTime; @Persistent private String recDate; @Persistent private String recTime; @Persistent private String sendName; @Persistent private String recName; @Persistent private String subject; @Persistent private String attachment; @Persistent private String context; @Persistent private String status; public Long getId() { return id; } public String getRecMail() { return recMail; } public void setRecMail(String recMail) { this.recMail = recMail; } public String getSendMail() { return sendMail; } public void setSendMail(String sendMail) { this.sendMail = sendMail; } public String getSendDate() { return sendDate; } public void setSendDate(String sendDate) { this.sendDate = sendDate; } public String getSendTime() { return sendTime; } public void setSendTime(String sendTime) { this.sendTime = sendTime; } public String getRecDate() { return recDate; } public void setRecDate(String recDate) { this.recDate = recDate; } public String getRecTime() { return recTime; } public void setRecTime(String recTime) { this.recTime = recTime; } public String getSendName() { return sendName; } public void setSendName(String sendName) { this.sendName = sendName; } public String getRecName() { return recName; } public void setRecName(String recName) { this.recName = recName; } public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public String getAttachment() { return attachment; } public void setAttachment(String attachment) { this.attachment = attachment; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } } my Service- GmailServiceImpl: public List findMail(String key) { PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(EmailBean.class); query.setFilter("status == statusParam && recMail == recMailParam "); query.setOrdering("id asc"); query.declareParameters("String statusParam,String recMailParam"); Map args = new HashMap(); args.put("statusParam", key); args.put("recMailParam", "jiejie111...@163.com"); List results = (List) query.executeWithMap (args); return results; } for gwt rule, the bean must be implements Serializable but when GmailServiceImpl. findMail is called ,the exception throw as follow: javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize (StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize (ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.wri
[appengine-java] high replication datastore simulation in local development server
Hi all, I have experimented with the local development server and the built-in simulation of the High Replication Datastore. The dev-server runs with the flag: -Ddatastore.default_high_rep_job_policy_unapplied_job_pct=X, where X is an integer between 0 and 100, as described in the Java GAE 1.5.1 release notes. My observation is that when choosing e.g. X=85 some entities get persisted/updated, others don't get persisted/updated, even if I wait a lng time (around an hour). >From these experiments, I speculate that X is the percentage of entities that do not get persisted/updated at all - never ever. Is this correct? That is, does the HRD simulation work as described above? If this is correct, then it does not work as one would expect for a HRD simulation, because in the real HRD entities _always_ get persisted/updated. That is, I expected that the parameter X specifies the _delay_ in persisting. 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-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.
[appengine-java] Re: Python bulk loader tool with local dev server of GAE Java
I have to agree on this - the current situation or documentation regarding this topic is absolutely useless at this point. It seems that no one cares to dump data from the appengine to the local datastore. No one testing locally with real data? [rant off] I have the same problems and can't import any data locally. If someone has managed to import data locally (without any programming) in the java-environment, then please share your success! :) Tom On 1 Aug., 14:49, Jan wrote: > Hi, > > I still did not find any solution to use the bulk uploader (now > version 1.3.5) locally with GAE/Java. Communication with the > production server works fine. > > As I cannot find any information about this issue, I assume that > nobody else faces this problem. Can someone please post the steps > necessary to make the Python bulk loader tool work locally with a Java > app? > > Are there any alternatives available for the Python bulk uploader? > > Thank you, > > Jan. -- 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] XMPP invite format
What is the is the syntax of the XMPP invite that I need to send to AppEngine before it's willing to communicate with my client? It's it a MUC direct invite? Example: Source: http://xmpp.org/extensions/xep-0249.html 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] First integration save fails with grails app-engine plugin
Hi all, I am using grails 1.3.5 and the latest app-engine and gorm-jpa plugins. I created a User class and a UserIntegrationTest to test it. However, I am getting a error in the reports: Could not open JPA EntityManager for transaction; nested exception is java.lang.NullPointerException: No API environment is registered for this thread. org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.NullPointerException: No API environment is registered for this thread. Caused by: java.lang.NullPointerException: No API environment is registered for this thread. at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(DatastoreApiHelper.java: 108) at com.google.appengine.api.datastore.BaseDatastoreService.beginTransaction(BaseDatastoreService.java: 125) at org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.beginTransaction(RuntimeExceptionWrappingDatastoreService.java: 209) at org.datanucleus.store.appengine.jpa.DatastoreEntityTransactionImpl.begin(DatastoreEntityTransactionImpl.java: 49) at _GrailsTest_groovy$_run_closure4.doCall(_GrailsTest_groovy: 269) at _GrailsTest_groovy$_run_closure4.call(_GrailsTest_groovy) at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy: 226) at _GrailsTest_groovy $_run_closure1_closure21.doCall(_GrailsTest_groovy:185) at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy: 172) at TestApp$_run_closure1.doCall(TestApp.groovy:101) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:590) at gant.Gant.executeTargets(Gant.groovy:589) Domain class is defined as: package com.jothub import javax.persistence.*; // import com.google.appengine.api.datastore.Key; @Entity class User implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id static constraints = { id visible:false } @Basic String emailAddress; @Basic String password; } The Test is defined as: package com.jothub import grails.test.* class UserIntegrationTests extends GrailsUnitTestCase { protected void setUp() { super.setUp() } protected void tearDown() { super.tearDown() } void testFirstSave() { User user = new User(emailAddress: 't...@abc.com', password: 'secret') assertNotNull user.save() assertNotNull user.id User foundUser = User.get(user.id) assertEquals 't...@abc.com', foundUser.emailAddress } -- 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] Entity relations (JPA vs lowlevel API)
Hi there, I'm searching for information of entity relation ships in appengine. JPA for example supports relations between entites (one-to-one, ont-to-many, many-to-many). As far as I know by know the underlying datastore doesn't direktly support this and not join queries (different entities). How do you store Customer -> Orders in the datastore? Is there low level API example code? Would I store an entity "Customer" with attributes and a list of order ids? Any help highly 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] @Basic(optional=false) not enforced.
Hi all -- 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] @Basic(optional=false) not enforced.
Hi all, I am using the grails app-engine and jpa-gorm plugin. I wrote a simple class User { @Basic(optional = false) String emailAddress; } I then run grails generate-all com.package.User I am able to create my user without entering any emailAddress, using the auto-generated scaffolding page. Why? Then I tested my class using class UserIntegrationTests extends GrailsUnitTestCase { private final LocalServiceTestHelper helper = new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig()); protected void setUp() { super.setUp() helper.setUp(); } protected void tearDown() { super.tearDown() helper.tearDown(); } void testFirstSave() { EntityManager em = TestEMF.get().createEntityManager(); EntityTransaction txn = em.getTransaction(); txn.begin(); User user = new User() em.persist(user); User merge = em.merge(user) User foundUser = em.find(User.class, merge.id) assertEquals(user.emailAddress, foundUser.emailAddress) txn.commit(); em.close(); } } There is no error either when I created a User. The JUnit code execute successfully. Why? I am scratching my head on how to use JPA to enforce data consistency. Any pointer will be greatly 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] Re: When deploying an application, what files are being uploaded?
My limited understanding is that everything in your project's war/ directory is uploaded (probably as a single .war file), so check there to see what can be pruned. Tom 2009/8/16 Kriván Bálint > > Hi! > > I would like to know what files are getting uploaded to google's > server (to see if I can minimize the number of files, maybe there are > unnecessary files). How can I check this? > > Thanks! > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-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 -~--~~~~--~~--~--~---
[appengine-java] Multi-app communication, discovery?
We're interested in hosting services via app-engine, so that various apps can share common functionality and data access. While multiple services can be deployed as a single application, it's better if they can be independently deployed. That means we should deploy each service as a separate app, right? Related questions: - Are there any inter-app communication mechanisms besides the URL Fetch API? If that's the only way, any recommendations on efficient RCP protocols, possibly GWT RPC? - Since LDAP isn't available, are there any other service discovery mechanisms? We're using Guice, and it would be nice to avoid hardwiring in URLs. 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-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 -~--~~~~--~~--~--~---
[appengine-java] Re: Inheritance in JDO
Does anyone know if JPA supports polymorphism? I've been working with JDO because it appears to be better documented right now, but I'd switch for a more Java-like model. Tom On Sun, Aug 23, 2009 at 7:22 AM, David Given wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > jd wrote: > [...] > > I have a structure similar to this this: > [...] > > class Zoo > > class Zebra implements Animal > > class Donkey implements Animal > [...] > > javax.jdo.JDOUserException: Field "animal" is declared as a reference > > type (interface/Object) but no implementation classes of "Animal" have > > been found! > > JDO on App Engine doesn't support polymorphism, as I understand it, > which means you have to store your Zebras and Donkeys separately. I take > it that what you want is a mixed bag of Animals of differing objects? > > The only way I found of doing that was to manually serialise my objects > and store them in Blobs. It's not as hard as it looks, as the low-level > API is quite nicely designed, but you do need to explicitly pull fields > you want indexed out of the object before serialisation and store them > as indexable properties on the entity. > > - -- > ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ > │ > │ "People who think they know everything really annoy those of us who > │ know we don't." --- Bjarne Stroustrup > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iD8DBQFKkVCdf9E0noFvlzgRAmmBAJwIHs8T5Qy5t0FgQ/ik4oTdOca1rACg0Oy1 > IzwfB2MUttjgJZMdgAetr38= > =U8uT > -END PGP SIGNATURE- > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: [appengine-java] Re: Feelings about new pricing model
> Put it this way: A single multithreaded Java > appserver instance should be able to happily consume every last CPU > cycle on a frontend box - and that's just the free tier. That presumes that the JVM that sandboxes the app is given access to all the CPU cycles. Nothing precludes mapping all Java threads onto a single native thread, for example. -- 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.
[appengine-java] Sharing jsession between frontend and backend?
I've got a public backend instance that I'd like to share the user session (java sessions are enabled for app) from the frontend with so that the user doesn't have to log in separately on the backend. The intent is that the backend will handle a few reporting pages that are memory intensive on the server, linked to from the frontend. I'm using a custom domain like: myapp.mydomain.com (frontend) mybackend.myapp.mydomain.com (backend) I can sign in to each fine separately, but the session and JSESSIONID cookie apparently aren't shared out of the box with subdomains. It creates a second session and cookie scoped to mybackend.myapp.mydomain.com. Anyone know how to configure things so the main cookie and session are shared with backend subdomains? -- 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.
[appengine-java] Confused about loading vs. non-loading requests when threadsafe on
The GAE documentation says you can detect loading requests like this: // web.xml snippet com.example.LogLoadingRequest // LogLoadingRequest.java public class LogLoadingRequest implements ServletContextListener { private static final Logger logger = Logger.getLogger(LogLoadingRequest.class.getName()); public void contextInitialized(ServletContextEvent sce) { logger.log(Level.INFO, "Loading request occuring."); } public void contextDestroyed(ServletContextEvent sce) { } } But I'm finding from my logs that what GAE thinks is a loading request (identified in log as loading_request=1) and which is given longer deadline, does NOT always match the request that logs the above "Loading request occuring." when Threadsafe is on. Should it, or is this method obsolete for threadsafe instances? Is there some other way I can detect loading vs non-loading requests with threadsafe on? With threadsafe on, non-loading requests are being assigned by GAE to instances while the loading request is still happening, resulting in all sort of (Hard)DeadlineExceeded issues in the non-loading requests. Reason is, loading requests are showing huge slow down and variance in loading times lately, often exceeding the 30 seconds that non-loading request are allowed - even though in my case loading should only take about 4 seconds (jaxb,PMF) plus whatever classloading and jvm startup takes. Worst thing is, these exceptions bring down the instance before loading can even finish, requiring multiple startup attempts. I'm trying to work around it by detecting loading vs. non-loading requests and in non-loading either doing a no-op if not critical, or proxying via urlfetch through to a backend until the loading request is complete. -- 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.
[appengine-java] Re: Confused about loading vs. non-loading requests when threadsafe on
Hi Jon, I raised issue http://code.google.com/p/googleappengine/issues/detail?id=5214 on the non-loading requests resulting in instance deaths with threadsafe on. It was a bit more verbose than it probably needs to be, but it describes the problem. If anyone knows another way to detect loading requests that works with threadsafe on, let me know. There is no guarantee that the servlet context is loaded during the loading request, so that's out for now, but if anyone knows another trick it will create options to work around the problem until a fix is available. Otherwise, I can disable threadsafe for now. But I'm reluctant - the efficiency is strangely reassuring.. /Tom On Jun 21, 1:25 pm, Jon McAlister wrote: > Hi Tom, > > I'm not sure about the servlet context listener code. > > However, thanks for pointing out the behavior of the interaction of > loading requests and threadsafe apps. We are indeed sending down > non-loading-requests while the instance is still processing the > loading request. This is problematic (for the reasons you list) and > something we didn't anticipate. We'll try to get a fix in to one of > the next releases. If you file it as an external issue we can use that > to notify when its closed. Until then your suggested workaround is > good, the other known workaround being to turn off threadsafe. > > Thanks for bringing this to our attention. > > On Sun, Jun 19, 2011 at 5:11 PM, Tom Phillips wrote: > > The GAE documentation says you can detect loading requests like this: > > > // web.xml snippet > > > > > > com.example.LogLoadingRequest > > > > > > > // LogLoadingRequest.java > > public class LogLoadingRequest implements ServletContextListener { > > private static final Logger logger = > > Logger.getLogger(LogLoadingRequest.class.getName()); > > public void contextInitialized(ServletContextEvent sce) { > > logger.log(Level.INFO, "Loading request occuring."); > > } > > > public void contextDestroyed(ServletContextEvent sce) { > > } > > } > > > But I'm finding from my logs that what GAE thinks is a loading request > > (identified in log as loading_request=1) and which is given longer > > deadline, does NOT always match the request that logs the above > > "Loading request occuring." when Threadsafe is on. > > > Should it, or is this method obsolete for threadsafe instances? Is > > there some other way I can detect loading vs non-loading requests with > > threadsafe on? > > > With threadsafe on, non-loading requests are being assigned by GAE to > > instances while the loading request is still happening, resulting in > > all sort of (Hard)DeadlineExceeded issues in the non-loading requests. > > Reason is, loading requests are showing huge slow down and variance in > > loading times lately, often exceeding the 30 seconds that non-loading > > request are allowed - even though in my case loading should only take > > about 4 seconds (jaxb,PMF) plus whatever classloading and jvm startup > > takes. Worst thing is, these exceptions bring down the instance before > > loading can even finish, requiring multiple startup attempts. I'm > > trying to work around it by detecting loading vs. non-loading requests > > and in non-loading either doing a no-op if not critical, or proxying > > via urlfetch through to a backend until the loading request is > > complete. > > > -- > > 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 > > athttp://groups.google.com/group/google-appengine-java?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-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.
[appengine-java] Re: Should JDO use be synchronized in threadsafe=true application?
I have only seen problems with getObjectById() (running threadsafe for two months), as per http://code.google.com/p/googleappengine/issues/detail?id=4834. I tried the "initialize with a synchronized dummy query" but didn't have much luck with it. In the meantime I've created wrapper methods that let me switch between using getObjectById(), and using a query by key. No other changes - no synchronization of anything, including the PersistenceManager. e.g.: static private final boolean QUERY = true; ... static public MyEntity getMyEntityById(PersistenceManager pm, Key key) { MyEntity e = null; if (!QUERY) { e = pm.getObjectById(MyEntity.class, key); } else { final Query query = pm.newQuery(MyEntity.class); query.setFilter("key == targetKey"); query.declareParameters("String targetKey"); final String keyStr = KeyFactory.keyToString(key); final List results = (List) query.execute(keyStr); if (results.size() != 0) { e = results.get(0); } if (e == null) { throw new AppException(FaultCodes.FAULT_OBJECT_NOT_FOUND, "Entity not found"); } } return e; } No issues with threadsafety for the query method and I can switch back to getObjectById() easily to test if it's been fixed. I haven't seen any issues so far (knock on wood) with writes or deletes, even under high load - only with reads via getObjectById(). /Tom On Jun 23, 6:12 pm, David wrote: > Aaron (or others), > > Do you have any updates from your experiences using JDO with > threadsafe enabled? Has your synchronization changes eliminated these > errors? Is it necessary to synchronize reads such as query.execute > and pm.detachCopyAll in additional to the write operations such as > pm.deletePersistent and pm.makePersistent? > > Thank you, > David > > On May 17, 4:51 pm, Aaron Shepherd wrote: > > > Ok. My change to PMF.java to synchronize the get of the > > PersistenceManager did NOT correct the problem. > > > Going to fallback to synchronizing every usage of the > > PersistenceManager (reads and writes). > > > Will update this issue with any further results. > > > On May 17, 1:54 am, Stephen Johnson wrote: > > > > Ah, I missed the point about it being tasks and didn't realize the > > > threadsafe only applied to user requests and not tasks. If indeed that > > > was > > > the case. > > > > On Mon, May 16, 2011 at 10:44 PM, Juha K wrote: > > > > The datanucleus issue has a comment "Then, when my tasks run in > > > > parallel, > > > > initialisation has already been done and the problem doesn't appear any > > > > more.", so before the threadsafe property, only tasks were run in > > > > parallel. > > > > Probably that's why I didn't see this error before, I didn't have tasks > > > > doing db access. > > > > > -- > > > > 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.
[appengine-java] Re: Experimental blobstore api returning null keys on blob creation
Assuming you're talking about new blobs, please check this issue: http://code.google.com/p/googleappengine/issues/detail?id=4872. I think there is no "good" workaround yet. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/nHGG3gfSqwgJ. 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.
[appengine-java] Re: Datastore access deadlock
To be defensive, you may want to try setting ~8 second timeouts for queries (setTimeoutMillis()) and for general read/writes in, for jdo, jdoconfig.xml (javax.jdo.option.DatastoreReadTimeoutMillis, javax.jdo.option.DatastoreWriteTimeoutMillis). You can then retry a couple times within the request keeping under the 30 second limit. It often, but not always, succeeds on one of the retries and salvages the request. /Tom On Jul 28, 5:11 pm, Eduardo Garcia Lopez wrote: > Hi, > > since last week I am experiencing a very serious problem in my application. > Probably since I deployed for the first time after the new SDK 1.5.2 was > released. > > The application is locking during 30 seconds (then it raises an timeout > Exception) just doing a single query. The query starts running normally > during a couple hours, then randomly starts locking, and after that almost > all queries like this lock. This is the query: > > PersistenceManager pm = PMF.get().getPersistenceManager(); > cmd = pm.getObjectById(Command.class, id); > > I have also tried changing to this query: > PersistenceManager pm = PMF.get().getPersistenceManager(); > query = pm.newQuery(Command.class, "id == idParameter"); > query.declareParameters("Long idParameter"); > query.setRange(0,1); > query.setUnique(true); > cmd = (Command) query.execute(id); > > in both cases, it hangs in last sentence. > > The persistence class is NOT marked as detachable. > > The received exception is this: > com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call > datastore_v3.RunQuery() took too long to respond and was cancelled > > Can somebody help me with this? Is somebody experiencing this error? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-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.
[appengine-java] New Billing Model,
Hi, We are currently developing a multi-user Java application on App Engine where we want to pass on the cost of the computing resources used to each individual user (plus our markup of course). The computing resources are composed of tasks placed on the task queue. The url of each item on the task queue can easily be related back to a specific user. Inside the tasks we make a few data store calls and some memcache calls and some urlfetch calls (as we're using the gdata apis to talk to Google apps apis). My question is: we were planning to use the *QuotaService *api to get the cpu cycles used and charge accordingly - but under the new billing model, as I understand it, this is no longer appropriate. Can anyone suggest a way forward with this? I have set up the appstats module - and it seems all the info I need is available to do the calculations under the new billing model - but can I get to this information programatically. I've had a good search through the api docs and didn't find anything. As a side note we are using multi tenancy for the datastore - with the userid as the namespace. So I think I have the datastore resources used per user under control. regards Tom -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/sBsX1KLs7P0J. 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.
[appengine-java] Re: .A research: how long will your java app instance start up fully?
~9s (1/3 JDO PMF, 1/3 JAXB context, 1/3 other) On Sep 29, 9:29 pm, Tapir wrote: > ? -- 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.
[appengine-java] JavaScriptException: (TypeError): Object [object Object] has no method 'push'
Hey, This is a problem in My App engine application. I`m guessing that im just a newbie that doesnt get the hole design of GWT. This is my code: public void onModuleLoad() { // Check login status using login service. LoginServiceAsync loginService = GWT.create(LoginService.class); loginService.checkLogin(GWT.getHostPageBaseURL(), new AsyncCallback() { public void onFailure(Throwable error) { } public void onSuccess(Boolean isLoggedIn) { if (isLoggedIn) { loadMainMenu(); } else { loadLogin(); } } }); RootLayoutPanel.get().add(main); } public void loadLogin() { main.clear(); LoginWindow loginPage = new LoginWindow(new EnterHandler()); main.add(loginPage, DockPanel.CENTER); } public void loadMainMenu() { main.clear(); MainMenuWindow mainMenuPage = new MainMenuWindow(new ExitHandler()); main.add(mainMenuPage, DockPanel.CENTER); } LoginWindow and MainMenuWindow is of type PANEL and not window. The exception is thrown when creating the second PANEL, doesnt matter wich of the windows is second. the "JavaScriptException: (TypeError): Object [object Object] has no method 'push'". Specificlly when I add an item to the container inside the constructor of one of the PANELS, What I wanted to do is Just to Remove the login panel from the screen and Add the main menu panel. I tried alot of diffrent ways to remove and add the panels, but all has failed for me.. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/Iqg3vdoOoz4J. 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.
[appengine-java] Programatic creation of an app instance
Hi all. I searched the archives but was unable to find an answer to my question. Basically wondering if it's possible to programatically create an application instance. Obviously I can update an instance using the AppCfg class, but I can't see an API for creating an instance (prior to uploading/updating). Sorry if there's an obvious answer... I'm a noob. Regards, Tom. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/4IAaZ1BlX4YJ. 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.
[appengine-java] Programmatic creation of an application/app-id... is it possible?
Hi all. I searched the archives but was unable to find an answer to my question. Basically wondering if it's possible to programatically create an application instance. Obviously I can update an instance using the AppCfg class, but I can't see an API for creating an instance. Sorry if there's an obvious answer... I'm a noob. Regards, 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-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.
[appengine-java] URLFetch Service - problem URL
We are getting timeout and also io exceptions when trying to urlfetch from a particular server. Here's an example url: http://gluepal.com/?q=rss.xml We always get the following exception convertApplicationException com.google.appengine.api.urlfetch.URLFetchServiceImpl 115 URLFetchServiceImpl.java Could not fetch URL: http://gluepal.com/?q=rss.xml It works fine on the development server. The request only takes 500ms. We've tried other urls on other servers and they all behave as expected. Its just this server. Other URLS on this server can return timeout errors or io errors even though the request is returning in less than 500ms when we test locally. FYI. gluepal.com is relativley new domain which we are hosting on siteground. Perhaps google dns isn't liking it - or its on some black list? regards 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-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.
[appengine-java] Re: Programmatic creation of an application/app-id... is it possible?
Guys anyone any ideas on this please? On 24/10/2011 13:47, Tom Fennelly wrote: Hi all. I searched the archives but was unable to find an answer to my question. Basically wondering if it's possible to programatically create an application instance. Obviously I can update an instance using the AppCfg class, but I can't see an API for creating an instance. Sorry if there's an obvious answer... I'm a noob. Regards, 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-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.
Re: [appengine-java] Re: Programmatic creation of an application/app-id... is it possible?
Thanks Gal. On 28/10/2011 06:37, Gal Dolber wrote: Yes, you can, using WebDriver. I don't remember if theres any captcha... that would be a problem. Just emulate what you would do manually. Regards On Thu, Oct 27, 2011 at 6:18 PM, Tom Fennelly <mailto:tom.fenne...@gmail.com>> wrote: Guys anyone any ideas on this please? On 24/10/2011 13:47, Tom Fennelly wrote: Hi all. I searched the archives but was unable to find an answer to my question. Basically wondering if it's possible to programatically create an application instance. Obviously I can update an instance using the AppCfg class, but I can't see an API for creating an instance. Sorry if there's an obvious answer... I'm a noob. Regards, 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-java@googlegroups.com <mailto:google-appengine-java@googlegroups.com>. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com <mailto:google-appengine-java%2bunsubscr...@googlegroups.com>. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- 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.
[appengine-java] What are these guys depleting our writing quota.....
e.run(TraceContext.java:453) at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.rpcFinished(RpcStub.java:781) at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.success(RpcStub.java:766) at com.google.net.rpc3.impl.client.RpcClientInternalContext.runCallbacks(RpcClientInternalContext.java:893) at com.google.net.rpc3.impl.client.RpcClientInternalContext.finishRpcAndNotifyApp(RpcClientInternalContext.java:799) at com.google.net.rpc3.impl.client.RpcNetChannel.afterFinishingActiveRpc(RpcNetChannel.java:1002) at com.google.net.rpc3.impl.client.RpcNetChannel.finishRpc(RpcNetChannel.java:844) at com.google.net.rpc3.impl.client.RpcNetChannel.handleResponse(RpcNetChannel.java:2112) at com.google.net.rpc3.impl.client.RpcNetChannel.messageReceived(RpcNetChannel.java:1933) at com.google.net.rpc3.impl.client.RpcNetChannel.access$1700(RpcNetChannel.java:144) at com.google.net.rpc3.impl.client.RpcNetChannel$TransportCallback.receivedMessage(RpcNetChannel.java:2880) at com.google.net.rpc3.impl.client.RpcChannelTransportData$TransportCallback.receivedMessage(RpcChannelTransportData.java:602) at com.google.net.rpc3.impl.wire.RpcBaseTransport.receivedMessage(RpcBaseTransport.java:420) at com.google.net.rpc3.impl.wire.RpcClientTcpTransport.parseOneMessage(RpcClientTcpTransport.java:773) at com.google.net.rpc3.impl.wire.RpcClientTcpTransport.parseMessages(RpcClientTcpTransport.java:651) at com.google.net.rpc3.impl.wire.RpcClientTcpTransport.access$100(RpcClientTcpTransport.java:38) at com.google.net.rpc3.impl.wire.RpcClientTcpTransport$1.dataReceived(RpcClientTcpTransport.java:293) at com.google.net.async3.SocketConnection.handleNetworkReadEvent(SocketConnection.java:828) at com.google.net.async3.SocketConnection.access$400(SocketConnection.java:40) at com.google.net.async3.SocketConnection$NetworkReadHandlerImpl.run(SocketConnection.java:857) at com.google.net.eventmanager.AbstractFutureTask$Sync.innerRun(AbstractFutureTask.java:260) at com.google.net.eventmanager.AbstractFutureTask.run(AbstractFutureTask.java:121) at com.google.net.eventmanager.EventManagerImpl.runTask(EventManagerImpl.java:576) at com.google.net.eventmanager.EventManagerImpl.internalRunWorkerLoop(EventManagerImpl.java:993) at com.google.net.eventmanager.EventManagerImpl.runWorkerLoop(EventManagerImpl.java:874) at com.google.net.eventmanager.WorkerThreadInfo.runWorkerLoop(WorkerThreadInfo.java:134) at com.google.net.eventmanager.EventManagerImpl$WorkerThread.run(EventManagerImpl.java:1829) Do you know what is this code (com.google.*) doing here? Why is it writing to datastore and depleted our quota? ( We use gwt-platform and objectify with app engine ) Thanks! -Tom -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/7zDyxp4RQgYJ. 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.
[appengine-java] corrupted content of text/html part in received email
Hi, App engine cannot receive html email ( sent from gmail ) correctly. ( @appid.appspotmail.com) The following code will show the error: byte[] bytes = content.getBytes(encoding); // gmail used "ISO-8859-1" mostly, "UTF-8" sometime also printBytes(bytes); -> output: 64 (offset from beginning): 30 2e 38 65 78 3b 20* 00 *61 64 64 69 6e 67 2d 6c - 0.8ex; 144: *00 *63 6f 6d 3c 2f 61 3e 26 67 74 3b 3c 2f 73 70 - 208: 20 30 70 78 20 30 2e 38 65* 00 *3b 20 70 61 64 64 - 0px 0.8e 00 doesn't make sense here and it was another correct character which was overwritten to 0. It repros in every html emails sent from gmail. The corruption happens every 72 characters or so. Looks like a bug we will file. -T -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/Ggg6jLrm1cgJ. 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.
[appengine-java] Memcache misses after 1.4.0 update
In my application I use memcache to store some data for a subsequent request (usually issued within 10-20 seconds after the initial caching) that needs to respond as quickly as possible. Any delay greatly hurts the user experience as it results in a significant pause in an automated phone call while the the required data is rebuilt. I've got three app deployments with the same code base (at least the same in any way AFAICT that could matter for this). It seems that in two that I have redeployed since 1.4.0 came out (cliniconexdev,cliniconextest), the subsequent request consistently doesn't find the cached entry. In the version that hasn't been redeployed since 1.4.0 (cliniconexapp) the entry is found 100% of the time. On the development server, the caching still works fine and I get a hit every time. When I cache the data I have an immediate retrieval in the same thread that verifies that it is infact there, and in all cases it is found fine at that point. But for the two app instances with the problem, by the followup web request it appears to be gone from, or not yet available in, the cache. Traffic is light ATM on all app instances and memcache quotas are barely touched. I have billing and reserved instances enabled on all three which is really the only change I've made since 1.4.0 came out. Anyone else seen this or have any ideas? The only thing I can think of is that maybe new memcache entries aren't available to all jvm instances within that 10-20 seconds and I'm seeing it now because I have multiple reserved instances (at least on apps deployed since 1.4.0). If I can get that behavior confirmed I'll have to figure out how to work around it. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Memcache entries - available how soon after entry?
I'm seeing unexpected (to me) Memcache behavior in my app ever since I enabled reserved instances (which I did first thing after 1.4.0). When one request adds a cache entry, subsequent requests anywhere from 10-60 seconds after are only able to find the entry sporadically. The cache is very lightly used and no expiry is set. I know that the correct key is being used by the writer and readers. The followup requests could be being handled by different JVM instances than the writer, but I wouldn't think this would make a difference. I'm not sure how to tell which instance services which request, I just now the request sequence. For all I know, the times it does find the cache entry might be only when serviced by the same JVM as the writer. Shouldn't Memcache entries be available to readers immediately after addition, and presumably available to all JVM instances? If not immediately for some reason, shouldn't they be available with 60 seconds? Thanks for any insight, 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] Re: Memcache entries - available how soon after entry?
So using UUID's class scope static variables I can now tell which JVM services each request. What I've confirmed is that at least when using reserved instances ("Always On"), Memcache entries are only found within the same JVM instance that created the cache entry. So I only get a cache hit if the next request goes to that same JVM. Is this expected behavior from Memcache, or should I raise a bug report? I pictured a highly-distributed memory cache available to the entire application. If it's per-JVM, I'm not sure why one wouldn't just use a Singleton or something to cache data, or why GAE RPC would be required when invoking the Memcache API. Thanks, Tom On Dec 14, 11:33 pm, Tom Phillips wrote: > I'm seeing unexpected (to me) Memcache behavior in my app ever since I > enabled reserved instances (which I did first thing after 1.4.0). When > one request adds a cache entry, subsequent requests anywhere from > 10-60 seconds after are only able to find the entry sporadically. > > The cache is very lightly used and no expiry is set. I know that the > correct key is being used by the writer and readers. > > The followup requests could be being handled by different JVM > instances than the writer, but I wouldn't think this would make a > difference. I'm not sure how to tell which instance services which > request, I just now the request sequence. For all I know, the times it > does find the cache entry might be only when serviced by the same JVM > as the writer. > > Shouldn't Memcache entries be available to readers immediately after > addition, and presumably available to all JVM instances? If not > immediately for some reason, shouldn't they be available with 60 > seconds? > > Thanks for any insight, > 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.
Re: [appengine-java] Re: How to simulate transactional behaviour for two root entites?
According to the documentation, it's also possible (though very unlikely) that App Engine will execute the enqueued task multiple times, this is something you may need to consider when implementing your balancing/reconciliation tasks. Tom. On 20 January 2011 18:07, Didier Durand wrote: > Hi, > > The usual way is to launch a task included in the 1st transaction for > the second update. > > See > http://code.google.com/appengine/docs/java/taskqueue/overview.html#Tasks_Within_Transactions > > You have the guarantee that the task is enqueued only if the 1st > update succeeds. What is not guaranteed though is a rollback on the > 1st update if the second fails or can't happen. You have to manage > this case by yourself probably via a 3rd task that you schedule when > the second fails. > > regards > > didier > > On Jan 20, 6:58 pm, "ss.require" wrote: >> I have the next problem: >> My app has thousands of users. Every user has money that can be >> represented as the "money" field in the "User" entity. If a payable >> event occurs in the app then I have to make a payment between two >> users so I need to update "money" fields for two "User" entities in a >> transaction. But I can't do it in a transaction because each user is >> in a different entity group and on the other hand I cann't put two >> users in a single entity group, because thus the single entity group >> will have all users and datastore contention problem will arise. >> >> I can't figure out how this use case can be implemented correctly or >> how to design a datastore model. >> Please, suggest best practices for this situation! > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to google-appengine-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.
Re: [appengine-java] Upgrade to GAE 1.4.2
I'm currently developing with Java. If it's any help, I did this... I produced a throw-away servlet that: On a GET request outputs a base-64 encoded gzipped serialized stream of every Entity object that I wanted to preserve from the old datastore, wrapped-up in a HTML form. On a POST request reverses the stream encoding, and simply calls Datastore.put() on every entity that comes out of the stream. To transfer the data between the two App Engine versions, I just started-up the old version, requested the form, stopped the server, started-up the new version, and submitted the form. Amazingly, this worked with no (apparent) problems and it was very quick to implement. Tom. On 16 February 2011 13:06, luka wrote: > Hello, > You probably aware of the following issue: > After upgrading from GAE 1.4.0 to 1.4.2 the local data-store is completely > deleted. > > Cheers > Uri > > -- > 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.
[appengine-java] Re: 1.4.2: Can't make https call from dev server
JVM (On Windows 7), I've tried a few for the development server including: java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode) Using java.net.HttpURLConnection to connect to https://api.twilio.com and getting: javax.net.ssl.SSLHandshakeException: Could not verify SSL certificate for: https://api.twilio.com api.twilio.com is only accessible over SSL so this problem is hampering development of our application with 1.4.2 /Tom On Monday, February 14, 2011 4:22:51 PM UTC-5, frew wrote: > > Hey everybody, > > In order to help me diagnose the problems, could you respond with what > JDK (Platform, JDK manufacturer (e.g. Sun, OpenJDK), and version) > you're running? As a temporary stopgap, if you're using URLFetch > service, you can use the doNotValidateCertificate() method in > FetchOptions (http://code.google.com/appengine/docs/java/javadoc/com/ > google/appengine/api/urlfetch/FetchOptions.html<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/FetchOptions.html>) > > to disable > validation. > > -Fred > > On Feb 13, 5:02 am, harri mauria wrote: > > I am having similar problems with the recently released version > > com.google.appengine.eclipse.sdkbundle.1.4.2_1.4.2.v201102111811 > > Problems happen with the development server, not in production. I am > > performing Facebook login credentials authentication in the callback > > url. Interrupt stack is below: > > > > HTTP ERROR 500 > > Problem accessing /loginfacebookcallback. Reason: > > > > Could not verify SSL certificate for: > https://graph.facebook.com/oauth/access_token?omitted > > > > Caused by: > > javax.net.ssl.SSLHandshakeException: Could not verify SSL certificate > > for:https://graph.facebook.com/oauth/access_token?omitted > > at > > > com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationExc > eption(URLFetchServiceImpl.java: > > 114) > > at > > > com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchService > Impl.java: > > 41) > > at > > > com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler > > $Connection.fetchResponse(URLFetchServiceStreamHandler.java:418) > > at > > > com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler > > $Connection.getInputStream(URLFetchServiceStreamHandler.java:297) > > atwww.superpass.de.server.UrlFetcher.get(UrlFetcher.java:60) > > > > Following message is printed to the console: > > I/O exception (javax.net.ssl.SSLPeerUnverifiedException) caught when > > processing request: HTTPS hostname invalid: expected > > 'graph.facebook.com', received '*.facebook.com' > > Retrying request > > > > Regards, Harri > > > > On Feb 13, 11:27 am, Lior Harsat wrote: > > > > > > > > > > > > > > > > > I am having a similar problem with https: > > > > > I have been testing the SDK and I found one bug which seems critical. > > > When I call the URLFetchService.fetch API with a https URL I get a > > > javax.net.ssl.SSLHandshakeException. > > > for example when I fetch "https://spreadsheets.google.com/feeds/ > > > list/" I get > > > javax.net.ssl.SSLHandshakeException: Could not verify SSL certificate > > > for:https://spreadsheets.google.com/feeds/list/... > > > When I switch back to an older SDK this doesn't happen. > > > Is there a "Help us test Prerelease SDK 1.4.2" thread I can post this > > > to? > > > Can anyone confirm this bug reproduces? > > > Thanx, Lior > > > > > On Feb 12, 11:57 am, Peter Liu wrote: > > > > > > We are using a custom remote delegate to route datastore rpc call to > > > > live production test site on appspot. We did this because sometimes > we > > > > want to develop with live data. > > > > > > However after upgrading to 1.4.2, https outbound call starts failing > > > > (see below). If we change to http, then it works again. > > > > > > It seems like some class is marked as restricted in this release. Is > > > > it intentional? What's the reason behind not allowing outbound https > > > > call? > > > > > > Thanks. > > > > > > java.lang.NoClassDefFoundError: javax.net.ss
[appengine-java] PersistenceManager (JDO), transaction and close() function
In almost every example code I can see, the PersistenceManager is never closed ( call close() ) with JDO transaction operation. What's the reason of that? ( In other cases, close() is always called in finally clause ) My code has both transaction and non-transaction operations, the entity returned from transaction operation always have JDO state and JDO manager attached which I want to remove so they have identical pattern for both cases. -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-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.
[appengine-java] Re: Uploading App to GAE with JSP compile Error
I renamed the broken .jsp to .x_jsp -- 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.
[appengine-java] The best practice of engineering with GAE (in Java) in a team
Our team is growing and I need advices on how our team can efficiently work with GAE. The ultimate goal here is to fast test and iterate on our app. The dev server is only OK for individuals. We have to use limited *.appspot.com ( and versions ) for many engineers and testers. It is not smooth yet. I wonder if anyone can share the best practices of working with GAE in a team. So people like us can learn without making too many mistakes. 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-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.
Re: [appengine-java] Task Enqueue in a Transaction
It's my understanding that, with HR, getting an entity by key is only strongly consistent within a transaction. If this is wrong, then a significant portion of my own task handling code may need revisiting... Perhaps someone who knows more could clarify this. Tom. On 21 March 2011 22:10, Simon Knott wrote: > I've got a query about tasks and transactions on a High-replication app that > I'm hoping someone can help me with. > I've got the following scenario: > 1) Begin a transaction > 2) Persist an entity > 3) Enqueue a task within the transaction > 4) Commit the transaction > Within the task, I get the entity via its key and I'm finding that the > object has yet to be updated in the datastore - it was my belief that > getting an entity via its key is strongly consistent, so I was quite > surprised to see that the entity was stale. Is this result expected? I've > got some defensive code in place now which just re-enqueues the task, but I > wasn't sure whether that was the right approach. > I originally had the same issue on the MS version of my app, before I > realised that I needed to enqueue the task within the same transaction to > ensure the persist had occurred before the task was run. > > -- > 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.
Re: [appengine-java] Task Enqueue in a Transaction
Thanks for the link, somehow I'd managed to miss that page of documentation entirely*; it's good to know, though it indicates other problems for the OP. I'm not clear on why eventually consistent gets aren't an option, ie. why all gets are indicated as being strongly consistent. Is this a direct consequence of replication algorithm used? There are various places in the code I'm currently developing where dirty gets are adequate and I'd be happy to see them faster. * As an aside, I do find the documentation on the datastore feels very scattered. I'd much prefer sections on the underlying app engine mechanics with less language specific guidance. Tom. On 22 March 2011 17:59, Jay Young wrote: > According to the docs, gets, puts, deletes, and ancestor queries are all > strongly consistent: > http://code.google.com/appengine/docs/java/datastore/hr/ > -- 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.
Re: [appengine-java] Re: Task Enqueue in a Transaction
That's not how I understood the documentation, and it isn't my experience either. http://code.google.com/appengine/docs/java/datastore/transactions.html This page explicitly states that it's the enqueing of the task which is subject to the transaction. It says nothing about its execution. When the task runs, it's free to do what ever work it wants to, including opening one or more transactions. I use the same pattern as the OP (except with a transaction around the get by key), and on the development server at least, it always sees the latest state of the datastore (post its enqueing transaction). Unfortunately the code hasn't transitioned to Google's servers for testing yet. Tom. On 23 March 2011 05:26, Didier Durand wrote: > Hi, > > For me, the answer is here: > http://code.google.com/appengine/docs/java/datastore/transactions.html#Isolation_and_Consistency > > They say: "Queries and gets inside a transaction are guaranteed to see > a single, consistent snapshot of the datastore as of the beginning of > the transaction. In particular, entities and index rows in the > transaction's entity group are fully updated so that queries return > the complete, correct set of result entities, without the false > positives or false negatives described in Transaction Isolation that > can occur in queries outside of transactions." > > The task is part of the initial transaction so it sees the ds as of > the beginning of the transaction > > regards > > didier > > On Mar 22, 9:12 pm, Tom Gibara wrote: >> Thanks for the link, somehow I'd managed to miss that page of >> documentation entirely*; it's good to know, though it indicates other >> problems for the OP. >> >> I'm not clear on why eventually consistent gets aren't an option, ie. >> why all gets are indicated as being strongly consistent. Is this a >> direct consequence of replication algorithm used? There are various >> places in the code I'm currently developing where dirty gets are >> adequate and I'd be happy to see them faster. >> >> * As an aside, I do find the documentation on the datastore feels very >> scattered. I'd much prefer sections on the underlying app engine >> mechanics with less language specific guidance. >> >> Tom. >> >> On 22 March 2011 17:59, Jay Young wrote: >> >> > According to the docs, gets, puts, deletes, and ancestor queries are all >> > strongly consistent: >> >http://code.google.com/appengine/docs/java/datastore/hr/ >> >> > > -- > 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.