This discussion is archived
1 Reply Latest reply: Mar 12, 2012 7:55 AM by cdelahun RSS

Query sent to a unactivated UnitOfWork

888359 Newbie
Currently Being Moderated

I've a bug on a application using TopLink 10.1.3.
The exception occurs only when the cache (soft/weak) is enabled on the targeted objects.
I've to descriptor named "Sv2Demande" and "Sv2Modification". "Sv2Demande" has a one-to-many relationship to "Sv2Modification" with transparent indirection.

With the cache is activated (usual object caching - not the result caching) , if a update the "Sv2Demande" and then read it again, TopLink gives me an instance of "Sv2Demande" with a reference to the previous unit of work in its Inderection Object. So when I trigger the indirection using:
The following exception occurs:

Exception [TOPLINK-6027] (Oracle TopLink - 10g Release 3 ( (Build 061004)): oracle.toplink.exceptions.QueryException
Exception Description: Query sent to a unactivated UnitOfWork.
Query: ReadAllQuery(eu.curia.suivi2.model.Sv2Modification)
     at oracle.toplink.exceptions.QueryException.querySentToInactiveUnitOfWork(
     at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(
     at oracle.toplink.publicinterface.Session.executeQuery(
     at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(
     at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(
     at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(
     at oracle.toplink.indirection.IndirectList.buildDelegate(
     at oracle.toplink.indirection.IndirectList.getDelegate(
     at oracle.toplink.indirection.IndirectList.size(
     at eu.curia.suivi2.datamanager.impl.DemandesDataManagerImpl.copyPropertiesFromDbToModelLight(
     at eu.curia.suivi2.datamanager.impl.DemandesDataManagerImpl.loadListeDemandesRecherche(

I have checked and we don't keep the reference to Sv2Demande used by the UnitOfWork, we reload it using a ReadQuery in a common ServerSession.

Any ideas?
  • 1. Re: Query sent to a unactivated UnitOfWork
    cdelahun Pro
    Currently Being Moderated
    TopLink is rather old and there have been a number of issues that might be related that have been since fixed. Try the latest version or at least the latest 10.1.3 patchset and see if it helps. If it does not, you may need to open a case with support to look into it further.

    Best Regards,


  • Correct Answers - 10 points
  • Helpful Answers - 5 points