javax.jdo.JDOUserException: To perform reads on persistent data outside of a transaction, the "nontransactionalRead" property must be set on the PersistenceManagerFactory or Transaction.

Oracle Community | 3004 | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Query returns results before tx starts

    Oracle Community | 1 decade ago | 3004
    javax.jdo.JDOUserException: To perform reads on persistent data outside of a transaction, the "nontransactionalRead" property must be set on the PersistenceManagerFactory or Transaction.

    Root Cause Analysis

    1. javax.jdo.JDOUserException

      To perform reads on persistent data outside of a transaction, the "nontransactionalRead" property must be set on the PersistenceManagerFactory or Transaction.

      at com.solarmetric.kodo.runtime.PersistenceManagerImpl.checkNontransactionalRead()
    2. com.solarmetric.kodo
      LazyResultList.get
      1. com.solarmetric.kodo.runtime.PersistenceManagerImpl.checkNontransactionalRead(Unknown Source)
      2. com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectById(Unknown Source)
      3. com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.createFromResultSet(Unknown Source)
      4. com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager$2.getResultObject(Unknown Source)
      5. com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(Unknown Source)
      6. com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(Unknown Source)
      6 frames
    3. Java RT
      AbstractList$Itr.next
      1. java.util.AbstractList$Itr.next(AbstractList.java:417)
      1 frame
    4. com.solarmetric.kodo
      ResultListIterator.next
      1. com.solarmetric.kodo.runtime.ResultListIterator.next(Unknown Source)
      1 frame
    5. Java RT
      LinkedList.addAll
      1. java.util.LinkedList.addAll(LinkedList.java:259)
      2. java.util.LinkedList.addAll(LinkedList.java:232)
      2 frames
    6. com.ysoft.jdo
      Client.main
      1. com.ysoft.jdo.book.resort.local.client.Client.viewReservations(Client.java:146)
      2. com.ysoft.jdo.book.resort.local.client.View.execute(Client.java:349)
      3. com.ysoft.jdo.book.resort.local.client.Client.execute(Client.java:115)
      4. com.ysoft.jdo.book.resort.local.client.Client.run(Client.java:92)
      5. com.ysoft.jdo.book.resort.local.client.Client.main(Client.java:50)
      5 frames