[appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-11 Thread linette
I have the same exception with my app. Here is my code: PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = this.pm.newQuery(select key from + Subscription.class.getName() + where nextMail = :dateParam status == :statusParam); ListKey keys

[appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-08 Thread JD
I am not using a transaction (see original POST), which is the problem. On Jun 4, 11:03 am, Chau Huynh cmhu...@gmail.com wrote: Did you have different entity groups inside a transaction? Google have a constraint of what can be done in a transaction

[appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-04 Thread JD
After debugging, I was able to get rid of the exception by removing a pm.newQuery() which was happening on a different entity group. To me this is a bug in App Engine, as there is no reason the query on a particular entity group should fail outside a transaction. On Jun 3, 12:25 pm, Millisecond

Re: [appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-04 Thread Chau Huynh
Did you have different entity groups inside a transaction? Google have a constraint of what can be done in a transaction here http://code.google.com/appengine/docs/python/datastore/transactions.html#What_Can_Be_Done_In_a_Transaction On Fri, Jun 4, 2010 at 5:45 PM, JD liva...@gmail.com wrote:

[appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-03 Thread JD
I added a call to flush() after every change on the PM-managed object, but that did not help. Also doing a pm.flush() does not throw this exception, but doing a pm.close() does - which seems to be contrary to your reasoning (I would expect flush to throw the same exception if multiple entity

[appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-03 Thread Millisecond
Hmmm. How is your object model structured? Do entities have other entities as direct references? If you have class A { B b } and setting b to an instance of B that already existed might throw the error you're seeing. I changed my structure to be class A { String bKey } for a variety of other

[appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-02 Thread Millisecond
Even though you're not using transactions, I think it's trying to make the .close() call atomic (maybe with an internal implicit transaction), failing or succeeding as a whole. And as I understand it, entities not in the same group can be stored on separate machines so can't be operated on