3 Replies Latest reply on Mar 10, 2004 10:08 PM by 3004

    Exception in thread "main" kodo.util.FatalInternalException:

    3004

      I have a method that is trying to save multiple objects:
      public void go()
      {

      tx.begin();
      for (int i = 0; i < 10; i++) {
      Person p = new Person();
      p.setForename("doug");
      p.setSurname("emerald");
      p.setGender("m");
      p.setBirthdate(new Date());
      pm.makePersistent(p);
      }
      ((KodoPersistenceManager) pm).flush();
      tx.commit();
      }

      After calling close() on the PersistenceManager and Factory I get this
      error:

      Exception in thread "main" kodo.util.FatalInternalException: 0 ::
      0:kodo.runtime.PNonTransState@15f7107 ::
      0:kodo.runtime.PNonTransState@15f7107
      at
      kodo.runtime.PersistenceManagerImpl.setStateManager(PersistenceManagerImpl.java:2923)
      at kodo.runtime.StateManagerImpl.commit(StateManagerImpl.java:680)
      at
      kodo.runtime.PersistenceManagerImpl.endTransaction(PersistenceManagerImpl.java:907)
      at
      kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:679)
      at
      kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:86)
      at
      kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:422)
      at JDOPerf.go(JDOPerf.java:67)
      at JDOPerf.<init>(JDOPerf.java:33)
      at JDOPerf.main(JDOPerf.java:16)

      What could be causing this error?

      Doug








        • 1. Re: Exception in thread "main" kodo.util.FatalInternalException:
          3004
          I should amend this, the error is on the tx.commit() call.

          Doug Emerald wrote:

          I have a method that is trying to save multiple objects:
          public void go()
          {
          tx.begin();
          for (int i = 0; i < 10; i++) {
          Person p = new Person();
          p.setForename("doug");
          p.setSurname("emerald");
          p.setGender("m");
          p.setBirthdate(new Date());
          pm.makePersistent(p);
          }
          ((KodoPersistenceManager) pm).flush();
          tx.commit();
          }
          After calling close() on the PersistenceManager and Factory I get this
          error:
          Exception in thread "main" kodo.util.FatalInternalException: 0 ::
          0:kodo.runtime.PNonTransState@15f7107 ::
          0:kodo.runtime.PNonTransState@15f7107
          at
          kodo.runtime.PersistenceManagerImpl.setStateManager(PersistenceManagerImpl.java:2923)
          at kodo.runtime.StateManagerImpl.commit(StateManagerImpl.java:680)
          at
          kodo.runtime.PersistenceManagerImpl.endTransaction(PersistenceManagerImpl.java:907)
          at
          kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:679)
          at
          kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:86)
          at
          kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:422)
          at JDOPerf.go(JDOPerf.java:67)
          at JDOPerf.<init>(JDOPerf.java:33)
          at JDOPerf.main(JDOPerf.java:16)
          What could be causing this error?
          Doug
          • 2. Re: Exception in thread "main" kodo.util.FatalInternalException:
            3004
            Does Person use application identity? Can you post the Persion's id class?

            Doug Emerald wrote:
            I should amend this, the error is on the tx.commit() call.

            Doug Emerald wrote:


            I have a method that is trying to save multiple objects:
            public void go()
            {
            tx.begin();
            for (int i = 0; i < 10; i++) {
            Person p = new Person();
            p.setForename("doug");
            p.setSurname("emerald");
            p.setGender("m");
            p.setBirthdate(new Date());
            pm.makePersistent(p);
            }
            ((KodoPersistenceManager) pm).flush();
            tx.commit();
            }
            After calling close() on the PersistenceManager and Factory I get this
            error:
            Exception in thread "main" kodo.util.FatalInternalException: 0 ::
            0:kodo.runtime.PNonTransState@15f7107 ::
            0:kodo.runtime.PNonTransState@15f7107
            at
            kodo.runtime.PersistenceManagerImpl.setStateManager(PersistenceManagerImpl.java:2923)
            at kodo.runtime.StateManagerImpl.commit(StateManagerImpl.java:680)
            at
            kodo.runtime.PersistenceManagerImpl.endTransaction(PersistenceManagerImpl.java:907)
            at
            kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:679)
            at
            kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:86)
            at
            kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:422)
            at JDOPerf.go(JDOPerf.java:67)
            at JDOPerf.<init>(JDOPerf.java:33)
            at JDOPerf.main(JDOPerf.java:16)
            What could be causing this error?
            Doug
            --
            Steve Kim
            skim@solarmetric.com
            SolarMetric Inc.
            http://www.solarmetric.com
            • 3. Re: Exception in thread "main" kodo.util.FatalInternalException:
              3004
              This error was a side effect of the problem I had in my previous post
              regarding sequences and application identity. It is now resolved.

              Thanks

              Stephen Kim wrote:
              Does Person use application identity? Can you post the Persion's id class?
              Doug Emerald wrote:
              I should amend this, the error is on the tx.commit() call.

              Doug Emerald wrote:


              I have a method that is trying to save multiple objects:
              public void go()
              {
              tx.begin();
              for (int i = 0; i < 10; i++) {
              Person p = new Person();
              p.setForename("doug");
              p.setSurname("emerald");
              p.setGender("m");
              p.setBirthdate(new Date());
              pm.makePersistent(p);
              }
              ((KodoPersistenceManager) pm).flush();
              tx.commit();
              }
              After calling close() on the PersistenceManager and Factory I get this
              error:
              Exception in thread "main" kodo.util.FatalInternalException: 0 ::
              0:kodo.runtime.PNonTransState@15f7107 ::
              0:kodo.runtime.PNonTransState@15f7107
              at
              kodo.runtime.PersistenceManagerImpl.setStateManager(PersistenceManagerImpl.java:2923)
              >>
              at kodo.runtime.StateManagerImpl.commit(StateManagerImpl.java:680)
              at
              kodo.runtime.PersistenceManagerImpl.endTransaction(PersistenceManagerImpl.java:907)
              >>
              at
              kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:679)
              >>
              at
              kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:86)
              at
              kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:422)
              at JDOPerf.go(JDOPerf.java:67)
              at JDOPerf.<init>(JDOPerf.java:33)
              at JDOPerf.main(JDOPerf.java:16)
              What could be causing this error?
              Doug
              --
              Steve Kim
              skim@solarmetric.com
              SolarMetric Inc.
              http://www.solarmetric.com