2 Replies Latest reply on Apr 18, 2007 10:00 AM by Peter Ottomanelli

    Cannot create more than 1 process in MSSQL

    Peter Ottomanelli Newbie

      Hello all,

      I am trying to create multiple processes and I keep getting this error when I use JBPM

      pr 17, 2007 6:26:15 PM org.hibernate.util.JDBCExceptionReporter logExceptions
      SEVERE: Violation of UNIQUE KEY constraint 'UQ__JBPM_PROCESSINST__11D4A34F'. Cannot insert duplicate key in object 'JBPM_PROCESSINSTANCE'.
      org.jbpm.persistence.JbpmPersistenceException: couldn't assign id to org.jbpm.graph.exe.ProcessInstance@1c45731
       at org.jbpm.persistence.db.DbPersistenceService.assignId(DbPersistenceService.java:326)
       at org.jbpm.svc.Services.assignId(Services.java:247)
       at org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:117)
       at org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:91)
       at org.jbpm.JbpmContext.newProcessInstance(JbpmContext.java:409)
       at com.rco.bpm.util.JBPMAccessor.startEfileDestructionProcess(JBPMAccessor.java:54)
       at com.rco.TestJBPMEfileProcess.testSimpleProcess(TestJBPMEfileProcess.java:19)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)



      My ProcessInstance.hbm.xml ID generation is like this


      <id name="id" column="ID_">
       <generator class="native" />
       </id>


      I am using the default hibernate SQL Server drivers. I also just recreated all tables using the latest 3.2 MSSQL scripts. I have tried changing the generator class to "guid" and "increment" but I keep getting errors on the save. Any ideas?