I can see why messing with a new entity outside a transaction before
persist is an issue if datanucleus.NontransactionalWrite is set to
false, but I have both datanucleus.NontransactionalRead and
datanucleus.NontransactionalWrite set to true and I still get the
error. The puzzling thing is this error comes up only once in a while
though the exact same code gets executed every time. Looks like
something intermittent...at least for me.

On Sep 3, 12:30 am, Didier Durand <[email protected]> wrote:
> Hi,
>
> This means that you are trying to act on an entity via the Persistence
> Manager when this same entity is not yet under control of the PM.
>
> It usually happens when you do a new on a Class and do not call the
> persist() function of the PM for that newly created instance before
> doing what you try to do then to reach the exception that you mention.
>
> Hope it's clear even though without all details, I have to stay
> abstract and generic...
>
> regards
> didier
>
> On Sep 2, 8:45 pm, nksi <[email protected]> wrote:
>
>
>
> > I also have a similar problem.
> > in my exsample:
>
> > @Entity
> > class Test {
> >   @Id
> >   @Column(name = "ID")
> >   @GeneratedValue(strategy = GenerationType.IDENTITY)
> >   private Long id;
> >   @Column(nullable = false)
> >   private Boolean isLatest;
>
> > }
>
> > # service
> > Test test = TestDao.getByCode("code")
> > test.setIsLatest(false)
> > TestDao.save(createTest())
>
> > #warning-log
> > Request completed without committing or rolling back transaction with
> > id 7.  Transaction will be rolled back.
>
> > When I comment out the line of "TestDao.save(createTest())", test is
> > merged.
> > And when i comment out the lines to merge, "TestDao.save" is success.
> > I wanna merge and save for same Model.
> > why can't i do it?plz tell me about it.
>
> > On 7月21日, 午前12:56, Sekhar <[email protected]> wrote:
>
> > > Anyone? Would appreciate just about any help you can give!
>
> > > On Jul 15, 8:45 am, Sekhar <[email protected]> wrote:
>
> > > > I pretty frequently get an error for my JPA entities saying an entity
> > > > is "is detached yet this operation requires it to be attached" and the
> > > > transaction isrolledback:
> > > > "com.google.apphosting.utils.servlet.TransactionCleanupFilter
> > > >handleAbandonedTxns: Request completed without committing or 
> > > >rollingbacktransaction with id 6520345908250195886.  Transaction will 
> > > >berolledback."
>
> > > > What does this error mean and how do I get rid of this? I did check
> > > > the DataNucleus docs and didn't really get any info on this. I have
> > > > datanucleus.NontransactionalRead and datanucleus.NontransactionalWrite
> > > > both set to true and open the transactions only to do the merge - is
> > > > that the problem? E.g., something like:
>
> > > > List<MyEntity> list = query.getResultList();
> > > > MyEntity e0 = list.get(0);
> > > > e0.setWhatever(whatever);
>
> > > > tx.begin();
> > > > entityManager.merge(e0);
> > > > tx.commit();

-- 
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 [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