Nichole, thanks for your response.  No, i'm certain I didn't.  In fact, the 
problem is happening again somewhere else so I can review and make certain 
of it.  I am hoping it's just an issue with the SDK and it will behave 
correctly in production.  Another thing is that it's random: I will get the 
error 2 to 10 times straight, and the next time it will work.

I'm using 1.5.2  Here are the details now:


[finder query]

 public static List<Key> findConversationKeysForCommentVisibleRanked(Key 
key, Integer convsToDisplay) {

  Query query = entityManager()

 .createQuery("SELECT key FROM Conversation o WHERE o.commentKey = 
:commentKey AND status " +

  "IN ('" + ConversationStatus.DEFAULT.name() + "', '" + ConversationStatus.
PRIORITIZED.name() + "') " +

  "order by rank ASC").setParameter("commentKey", key);

  if (convsToDisplay != null) {

 query.setMaxResults(convsToDisplay);

 }

  return query.getResultList();

}


 [domain logic]

List<Key> convKeys = 
findConversationKeysForCommentVisibleRanked(this.commentKey, null);

int numConvs = convKeys.size();

// find current and new position, all based just on entity's (this) key and 
the key list from query

this.setRank(newRank);

        this.entityManager.merge(this);


[exception I get, redacted]

WARNING: Request completed without committing or rolling back transaction 
with id 2.  Transaction will be rolled back.

2011-09-05 23:26:36,859 [971889075@qtp-1108447-0] DEBUG 
org.springframework.orm.jpa.EntityManagerFactoryUtils - Could not close JPA 
EntityManager

javax.persistence.PersistenceException: Illegal argument

at 
org.datanucleus.jpa.NucleusJPAHelper.getJPAExceptionForJDOException(NucleusJPAHelper.java:214)

at org.datanucleus.jpa.EntityManagerImpl.close(EntityManagerImpl.java:157)

at 
org.datanucleus.store.appengine.jpa.DatastoreEntityManager.close(DatastoreEntityManager.java:62)

Caused by: java.lang.IllegalArgumentException: can't operate on multiple 
entity groups in a single transaction. found both Element {

  type: "Conversation"

  id: 38

}

 and Element {

  type: "Conversation"

  id: 34

}


 

-- 
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/-/EsdXzHj_cAUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to