13 Replies Latest reply on Feb 25, 2003 11:11 PM by 3004

    Exception when call makeNontransactional() on Transient Transactional instance

    3004
      this fragment causes exception in Kodo v2.4.1

      Court coo = Court.newInstance();
      jdo.pm().makeTransactional(coo);
      jdo.pm().makeNontransactional(coo); // evict would causes the same error
      jdo.pm().evict(coo);


      javax.jdo.JDOUserException: The instance "class
      peacetech.gao.ogc.gctrack.jdo.Court" of id
      "peacetech.gao.ogc.gctrack.jdo.oid.CourtOid#8852" is not managed by this
      PersistenceManager.
      at
      com.solarmetric.kodo.runtime.PersistenceManagerImpl.checkValid(PersistenceMa
      nagerImpl.java:2234)
      at
      com.solarmetric.kodo.runtime.PersistenceManagerImpl.makeNontransactionalFilt
      er(PersistenceManagerImpl.java:1268)
      at
      com.solarmetric.kodo.runtime.PersistenceManagerImpl.makeNontransactional(Per
      sistenceManagerImpl.java:1249)
      at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
      Exception in thread "main" Process terminated with exit code 1


        • 1. Re: Exception when call makeNontransactional() on Transient Transactional instance
          3004
          Transactional Transient instances stays forever in PM's ManagedObjects even
          if evictAll() is issued and so do all object they reference eating all
          available memory untill garbage collection kicks in.

          and if I keep reading this objects over and over again

          Kodo blows with following error:

          javax.jdo.JDODataStoreException: javax.jdo.JDODataStoreException: Type
          "null" is referenced in the database, but does not exist.
          NestedThrowables:
          java.lang.NullPointerException
          NestedThrowables:
          javax.jdo.JDODataStoreException: Type "null" is referenced in the database,
          but does not exist.
          NestedThrowables:
          java.lang.NullPointerException
          at
          com.solarmetric.kodo.runtime.objectprovider.EagerResultList.<init>(EagerResu
          ltList.java:40)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.ResultListFactory.createResultList(Re
          sultListFactory.java:75)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
          reManager.java:709)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
          :93)
          at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
          at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:595)
          at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
          NestedThrowablesStackTrace:
          javax.jdo.JDODataStoreException: Type "null" is referenced in the database,
          but does not exist.
          NestedThrowables:
          java.lang.NullPointerException
          at
          com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getType(Subcla
          ssProviderImpl.java:122)
          at
          com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getType(Subcla
          ssProviderImpl.java:96)
          at
          com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.loadPrimaryMappings(Cl
          assMapping.java:1034)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.initialize(JDBCStore
          Manager.java:249)
          at
          com.solarmetric.kodo.runtime.StateManagerImpl.loadInitialState(StateManagerI
          mpl.java:174)
          at
          com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectByIdFilter(Pers
          istenceManagerImpl.java:1023)
          at
          com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectById(Persistenc
          eManagerImpl.java:942)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.createFromResultSet(
          JDBCStoreManager.java:762)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager$2.getResultObject(JD
          BCStoreManager.java:717)
          at
          com.solarmetric.kodo.runtime.objectprovider.EagerResultList.<init>(EagerResu
          ltList.java:35)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.ResultListFactory.createResultList(Re
          sultListFactory.java:75)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
          reManager.java:709)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
          :93)
          at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
          at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:595)
          at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
          NestedThrowablesStackTrace:
          java.lang.NullPointerException
          at
          com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getType(Subcla
          ssProviderImpl.java:118)
          at
          com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getType(Subcla
          ssProviderImpl.java:96)
          at
          com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.loadPrimaryMappings(Cl
          assMapping.java:1034)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.initialize(JDBCStore
          Manager.java:249)
          at
          com.solarmetric.kodo.runtime.StateManagerImpl.loadInitialState(StateManagerI
          mpl.java:174)
          at
          com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectByIdFilter(Pers
          istenceManagerImpl.java:1023)
          at
          com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectById(Persistenc
          eManagerImpl.java:942)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.createFromResultSet(
          JDBCStoreManager.java:762)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager$2.getResultObject(JD
          BCStoreManager.java:717)
          at
          com.solarmetric.kodo.runtime.objectprovider.EagerResultList.<init>(EagerResu
          ltList.java:35)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.ResultListFactory.createResultList(Re
          sultListFactory.java:75)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
          reManager.java:709)
          at
          com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
          :93)
          at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
          at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:595)
          at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
          Exception in thread "main" Process terminated with exit code 1


          "Alex Roytman" <roytman@smart.net> wrote in message
          news:b3ec00$5t0$1@solarmetric.netmar.com...
          this fragment causes exception in Kodo v2.4.1

          Court coo = Court.newInstance();
          jdo.pm().makeTransactional(coo);
          jdo.pm().makeNontransactional(coo); // evict would causes the same
          error
          jdo.pm().evict(coo);


          javax.jdo.JDOUserException: The instance "class
          peacetech.gao.ogc.gctrack.jdo.Court" of id
          "peacetech.gao.ogc.gctrack.jdo.oid.CourtOid#8852" is not managed by this
          PersistenceManager.
          at
          com.solarmetric.kodo.runtime.PersistenceManagerImpl.checkValid(PersistenceMa
          nagerImpl.java:2234)
          at
          com.solarmetric.kodo.runtime.PersistenceManagerImpl.makeNontransactionalFilt
          er(PersistenceManagerImpl.java:1268)
          at
          com.solarmetric.kodo.runtime.PersistenceManagerImpl.makeNontransactional(Per
          sistenceManagerImpl.java:1249)
          at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
          Exception in thread "main" Process terminated with exit code 1

          • 2. Re: Exception when call makeNontransactional() on Transient Transactional instance
            3004
            Sorry "null" is referenced in the database, but does not exist error does
            not apply - someone was tampering with data

            "Alex Roytman" <roytman@smart.net> wrote in message
            news:b3ed3t$6j1$1@solarmetric.netmar.com...
            Transactional Transient instances stays forever in PM's ManagedObjects
            even
            if evictAll() is issued and so do all object they reference eating all
            available memory untill garbage collection kicks in.

            and if I keep reading this objects over and over again

            Kodo blows with following error:

            javax.jdo.JDODataStoreException: javax.jdo.JDODataStoreException: Type
            "null" is referenced in the database, but does not exist.
            NestedThrowables:
            java.lang.NullPointerException
            NestedThrowables:
            javax.jdo.JDODataStoreException: Type "null" is referenced in the
            database,
            but does not exist.
            NestedThrowables:
            java.lang.NullPointerException
            at
            com.solarmetric.kodo.runtime.objectprovider.EagerResultList.<init>(EagerResu
            ltList.java:40)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.ResultListFactory.createResultList(Re
            sultListFactory.java:75)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
            reManager.java:709)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
            :93)
            at
            com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
            at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:595)
            at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
            NestedThrowablesStackTrace:
            javax.jdo.JDODataStoreException: Type "null" is referenced in the
            database,
            but does not exist.
            NestedThrowables:
            java.lang.NullPointerException
            at
            com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getType(Subcla
            ssProviderImpl.java:122)
            at
            com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getType(Subcla
            ssProviderImpl.java:96)
            at
            com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.loadPrimaryMappings(Cl
            assMapping.java:1034)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.initialize(JDBCStore
            Manager.java:249)
            at
            com.solarmetric.kodo.runtime.StateManagerImpl.loadInitialState(StateManagerI
            mpl.java:174)
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectByIdFilter(Pers
            istenceManagerImpl.java:1023)
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectById(Persistenc
            eManagerImpl.java:942)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.createFromResultSet(
            JDBCStoreManager.java:762)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager$2.getResultObject(JD
            BCStoreManager.java:717)
            at
            com.solarmetric.kodo.runtime.objectprovider.EagerResultList.<init>(EagerResu
            ltList.java:35)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.ResultListFactory.createResultList(Re
            sultListFactory.java:75)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
            reManager.java:709)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
            :93)
            at
            com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
            at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:595)
            at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
            NestedThrowablesStackTrace:
            java.lang.NullPointerException
            at
            com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getType(Subcla
            ssProviderImpl.java:118)
            at
            com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getType(Subcla
            ssProviderImpl.java:96)
            at
            com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.loadPrimaryMappings(Cl
            assMapping.java:1034)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.initialize(JDBCStore
            Manager.java:249)
            at
            com.solarmetric.kodo.runtime.StateManagerImpl.loadInitialState(StateManagerI
            mpl.java:174)
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectByIdFilter(Pers
            istenceManagerImpl.java:1023)
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.getObjectById(Persistenc
            eManagerImpl.java:942)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.createFromResultSet(
            JDBCStoreManager.java:762)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager$2.getResultObject(JD
            BCStoreManager.java:717)
            at
            com.solarmetric.kodo.runtime.objectprovider.EagerResultList.<init>(EagerResu
            ltList.java:35)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.ResultListFactory.createResultList(Re
            sultListFactory.java:75)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
            reManager.java:709)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
            :93)
            at
            com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
            at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:595)
            at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
            Exception in thread "main" Process terminated with exit code 1


            "Alex Roytman" <roytman@smart.net> wrote in message
            news:b3ec00$5t0$1@solarmetric.netmar.com...
            this fragment causes exception in Kodo v2.4.1

            Court coo = Court.newInstance();
            jdo.pm().makeTransactional(coo);
            jdo.pm().makeNontransactional(coo); // evict would causes the same
            error
            jdo.pm().evict(coo);


            javax.jdo.JDOUserException: The instance "class
            peacetech.gao.ogc.gctrack.jdo.Court" of id
            "peacetech.gao.ogc.gctrack.jdo.oid.CourtOid#8852" is not managed by this
            PersistenceManager.
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.checkValid(PersistenceMa
            nagerImpl.java:2234)
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.makeNontransactionalFilt
            er(PersistenceManagerImpl.java:1268)
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.makeNontransactional(Per
            sistenceManagerImpl.java:1249)
            at peacetech.gao.ogc.gctrack.Test.main(Test.java:51)
            Exception in thread "main" Process terminated with exit code 1

            • 3. Re: Exception when call makeNontransactional() on Transient Transactional instance
              3004
              Can you try it using datastore identity?
              • 4. Re: Exception when call makeNontransactional() on Transient Transactional instance
                3004
                All my projects use application identity but I can quickly build a test with
                datastore identity if you want me to

                "Abe White" <awhite@solarmetric.com> wrote in message
                news:pan.2003.02.25.04.05.42.455680.2841@solarmetric.com...
                Can you try it using datastore identity?
                • 5. Re: Exception when call makeNontransactional() on Transient Transactional instance
                  3004
                  In case of datastore identity no exception thrown. makeNontransactional()
                  works evict() does not:

                  Court coo = Court.newInstance();
                  jdo.pm().makeTransactional(coo);
                  jdo.pm().makeNontransactional(coo); // removes coo from pm's
                  ManagedObjects
                  // jdo.pm().evict(coo); // DOES NOT remove coo from pm's ManagedObjects



                  "Abe White" <awhite@solarmetric.com> wrote in message
                  news:pan.2003.02.25.04.05.42.455680.2841@solarmetric.com...
                  Can you try it using datastore identity?
                  • 6. Re: Exception when call makeNontransactional() on Transient Transactional instance
                    3004
                    Right; the correct way to get rid of a transactional-transient instance is
                    to call makeNontransactional. We'll fix up the application identity bug,
                    but I assume that you don't mind making the items of your serilized
                    collection use datastore identity for now?
                    • 7. Re: Exception when call makeNontransactional() on Transient Transactional instance
                      3004
                      Yes I am changing it to use datastore identity. Should't evict have the
                      same effect on transaction transient as makeNontransactional() ?

                      "Abe White" <awhite@solarmetric.com> wrote in message
                      news:pan.2003.02.25.15.25.30.152468.2841@solarmetric.com...
                      Right; the correct way to get rid of a transactional-transient instance is
                      to call makeNontransactional. We'll fix up the application identity bug,
                      but I assume that you don't mind making the items of your serilized
                      collection use datastore identity for now?
                      • 8. Re: Exception when call makeNontransactional() on Transient Transactional instance
                        3004
                        Yes I am changing it to use datastore identity. Should't evict have the
                        same effect on transaction transient as makeNontransactional() ?
                        No; eviction only affects persistent state.
                        • 9. Re: Exception when call makeNontransactional() on Transient Transactional instance
                          3004
                          Abe I found out that evict() does not evict some instances with app identity
                          from cache while it evicts the others.
                          This instances are:
                          1. Subclasses of a PC
                          2. Have collection field which consists of transient transactional PCs and
                          use custom mappings.
                          I made those transient transactional non transactional before I called evict
                          on the their owner - did not help. If I call makeTransient on owner it is
                          removed from cache just fine but evict does not remove it


                          "Abe White" <awhite@solarmetric.com> wrote in message
                          news:pan.2003.02.25.15.25.30.152468.2841@solarmetric.com...
                          Right; the correct way to get rid of a transactional-transient instance is
                          to call makeNontransactional. We'll fix up the application identity bug,
                          but I assume that you don't mind making the items of your serilized
                          collection use datastore identity for now?
                          • 10. Re: Exception when call makeNontransactional() on Transient Transactional instance
                            3004
                            On Tue, 25 Feb 2003 11:16:58 -0600, Alex Roytman wrote:
                            Abe I found out that evict() does not evict some instances with app
                            identity from cache while it evicts the others. This instances are: 1.
                            Subclasses of a PC
                            You're saying eviction is not hollowing persistent objects that (a) use
                            application identity and (b) are subclasses of another persistent object?
                            I just want to make sure I'm clear on the problem.
                            • 11. Re: Exception when call makeNontransactional() on Transient Transactional instance
                              3004
                              Also, how are you testing for eviction? Remember that eviction doesn't
                              kick an object out of the cache, it just hollows it. Removing an object
                              from the PM's cache without making it transient would violate the
                              uniqueness requirement for PMs.
                              • 12. Re: Exception when call makeNontransactional() on Transient Transactional instance
                                3004
                                Just checked and presence of custom mappings does not make any difference.
                                It exibits the same behaviour with conventional PC which use inheritance

                                "Alex Roytman" <roytman@smart.net> wrote in message
                                news:b3g8es$2ft$1@solarmetric.netmar.com...
                                Abe I found out that evict() does not evict some instances with app
                                identity
                                from cache while it evicts the others.
                                This instances are:
                                1. Subclasses of a PC
                                2. Have collection field which consists of transient transactional PCs and
                                use custom mappings.
                                I made those transient transactional non transactional before I called
                                evict
                                on the their owner - did not help. If I call makeTransient on owner it is
                                removed from cache just fine but evict does not remove it


                                "Abe White" <awhite@solarmetric.com> wrote in message
                                news:pan.2003.02.25.15.25.30.152468.2841@solarmetric.com...
                                Right; the correct way to get rid of a transactional-transient instance
                                is
                                to call makeNontransactional. We'll fix up the application identity
                                bug,
                                but I assume that you don't mind making the items of your serilized
                                collection use datastore identity for now?
                                • 13. Re: Exception when call makeNontransactional() on Transient Transactional instance
                                  3004
                                  Yes, you are right. I forgot that eviction should not remove an instance
                                  from cache just hollow it. I take this issue with eviction not working back.
                                  There is still this bug with exception on makeTransient() for
                                  transient-transactional app identity cases


                                  "Abe White" <awhite@solarmetric.com> wrote in message
                                  news:pan.2003.02.25.18.13.31.752955.2841@solarmetric.com...
                                  On Tue, 25 Feb 2003 11:16:58 -0600, Alex Roytman wrote:
                                  Abe I found out that evict() does not evict some instances with app
                                  identity from cache while it evicts the others. This instances are: 1.
                                  Subclasses of a PC
                                  You're saying eviction is not hollowing persistent objects that (a) use
                                  application identity and (b) are subclasses of another persistent object?
                                  I just want to make sure I'm clear on the problem.