1 Reply Latest reply on Feb 8, 2007 11:03 PM by freeyou ok

    org.hibernate.TransientObjectException - deploy ProcessDefin

    freeyou ok Newbie

      jbpm-3.1.3
      winxp
      jdk1.5
      resin
      oracle9
      ------------------------------------------------------------------------
      JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
      JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
      try {
      ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(new FileInputStream("***/***/***.xml"));
      jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition);
      jbpmContext.getGraphSession().deployProcessDefinition(processDefinition);

      }finally {
      jbpmContext.close();
      }
      ----------------------------------------------------------
      org.hibernate.TransientObjectException: org.jbpm.graph.def.Node
      at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:216)
      at org.hibernate.type.EntityType.getIdentifier(EntityType.java:108)
      at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:220)
      at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:476)
      at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:2900)
      at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:474)
      at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:197)
      at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:120)
      at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195)
      at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:993)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:340)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:162)