2 Replies Latest reply on Sep 30, 2005 2:12 AM by a_ja

    Deploy processdefine.xml error in jbpm2.0

    a_ja Newbie

      processdefine.xml is:

      <?xml version="1.0" encoding="GBK"?>
      <!DOCTYPE process-definition PUBLIC
       "-//jBpm/jBpm Mapping DTD 2.0//EN"
       "http://jbpm.org/dtd/processdefinition-2.0.dtd">
      <process-definition name="RequestLeave">
       <swimlane name="requester">
       </swimlane>
       <swimlane name="chief">
       <delegation class="kellerdu.jbpm.delegation.ChiefSwimlane"/>
       </swimlane>
       <swimlane name="boss">
       <delegation class="kellerdu.jbpm.delegation.BossSwimlane"/>
       </swimlane>
       <start-state name="request" swimlane="requester">
       <transition to="BeginRequest"/>
       </start-state>
       <fork name="BeginRequest">
       <transition to="RequesterCancel"/>
       <transition to="IsChief"/>
       </fork>
       <decision name="IsChief">
       <delegation class="kellerdu.jbpm.delegation.ChiefDecision"/>
       <transition name="BossApprove" to="BossApprove"/>
       <transition name="ChiefApprove" to="ChiefApprove"/>
       </decision>
       <state name="RequesterCancel">
       <assignment swimlane="requester"/>
       <transition name="cancel" to="Decided">
       <action>
       <delegation class="kellerdu.jbpm.action.RequestCancel"/>
       </action>
       </transition>
       </state>
       <state name="ChiefApprove">
       <assignment swimlane="chief"/>
       <transition name="approve" to="NeedBossApprove">
       <action>
       <delegation class="kellerdu.jbpm.action.ChiefApprove"/>
       </action>
       </transition>
       <transition name="disapprove" to="Decided">
       <action>
       <delegation class="kellerdu.jbpm.action.ChiefDisapprove"/>
       </action>
       </transition>
       </state>
       <state name="BossApprove">
       <assignment swimlane="boss"/>
       <transition name="approve" to="Decided">
       <action>
       <delegation class="kellerdu.jbpm.action.BossApprove"/>
       </action>
       </transition>
       <transition name="disapprove" to="Decided">
       <action>
       <delegation class="kellerdu.jbpm.action.BossDisapprove"/>
       </action>
       </transition>
       </state>
       <decision name="NeedBossApprove">
      
       <delegation class="kellerdu.jbpm.delegation.NeedBossApproveDecision"/>
       <transition name="need" to="BossApprove"/>
       <transition name="notNeed" to="Decided"/>
       </decision>
       <join name="Decided">
       <delegation class="kellerdu.jbpm.delegation.DecidedJoin"/>
       <transition to="DoSomething"/>
       </join>
       <decision name="DoSomething">
       <description>
       </description>
       <delegation class="kellerdu.jbpm.delegation.DoSomethingDecision"/>
       <transition name="disapprove" to="Finished">
       <action>
       <delegation class="kellerdu.jbpm.action.Disapprove"/>
       </action>
       </transition>
       <transition name="approve" to="Finished">
       <action>
       <delegation class="kellerdu.jbpm.action.Approve"/>
       </action>
       </transition>
       <transition name="cancel" to="Finished">
       <action>
       <delegation class="kellerdu.jbpm.action.Cancel"/>
       </action>
       </transition>
       </decision>
       <end-state name="Finished"/>
       <action event-type="process-end">
       <delegation class="kellerdu.jbpm.action.ProcessEndAction"/>
       </action>
      </process-definition>

      --------------------------------------
      deploy method:

      public void deployProcess(String processDefineFile){
       try {
      
       // create a process archive input stream
       String resource = processDefineFile;
       InputStream is = ProcessTest.class.getClassLoader().getResourceAsStream(resource);
       ArchiveBuilder ab = new ArchiveBuilder(is);
       JarInputStream jis = ab.getJarInputStream();
      
       // deploy the process
       DefinitionService ds = JbpmServiceFactory.getInstance().openDefinitionService();
       ds.deployProcessArchive(jis);
       ds.close();
      
       } catch (Exception e) {
       throw new RuntimeException("couldn't deploy process", e);
       }
      
       }

      -----------------------------
      Exception:

      ??: SQL Error: 0, SQLState: 010042005-9-30 10:39:58 net.sf.hibernate.util.JDBCExceptionReporter logExceptions
      ??: Data truncation
      2005-9-30 10:39:58 net.sf.hibernate.util.JDBCExceptionReporter logExceptions
      ??: SQL Error: 8152, SQLState: 22001
      2005-9-30 10:39:58 net.sf.hibernate.util.JDBCExceptionReporter logExceptions
      ??: ?????????????
      2005-9-30 10:39:58 net.sf.hibernate.JDBCException
      ??: could not insert: [org.jbpm.model.definition.impl.DecisionImpl#45875209]
      java.sql.DataTruncation: Data truncation
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:378)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:620)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:483)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:445)
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:402)
      at com.mchange.v2.c3p0.impl.C3P0PreparedStatement.executeUpdate(C3P0PreparedStatement.java:68)
      at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:469)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443)
      at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
      at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
      at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
      at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
      at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:56)
      at org.jbpm.impl.DefinitionServiceImpl.deployProcessArchive(DefinitionServiceImpl.java:57)
      at org.jbpm.example.ProcessTest.deployProcess(ProcessTest.java:29)
      at org.jbpm.example.ProcessTest.main(ProcessTest.java:79)
      2005-9-30 10:39:58 net.sf.hibernate.impl.SessionImpl execute
      ??: Could not synchronize database state with session
      net.sf.hibernate.JDBCException: could not insert: [org.jbpm.model.definition.impl.DecisionImpl#45875209]
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:479)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443)
      at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
      at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
      at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
      at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
      at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:56)
      at org.jbpm.impl.DefinitionServiceImpl.deployProcessArchive(DefinitionServiceImpl.java:57)
      at org.jbpm.example.ProcessTest.deployProcess(ProcessTest.java:29)
      at org.jbpm.example.ProcessTest.main(ProcessTest.java:79)
      Caused by: java.sql.DataTruncation: Data truncation
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:378)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:620)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:483)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:445)
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:402)
      at com.mchange.v2.c3p0.impl.C3P0PreparedStatement.executeUpdate(C3P0PreparedStatement.java:68)
      at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:469)
      ... 9 more
      2005-9-30 10:39:58 org.jbpm.persistence.hibernate.HibernateSession commitTransaction
      ??: couldn't commit transaction
      net.sf.hibernate.JDBCException: could not insert: [org.jbpm.model.definition.impl.DecisionImpl#45875209]
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:479)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443)
      at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
      at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
      at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
      at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
      at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:56)
      at org.jbpm.impl.DefinitionServiceImpl.deployProcessArchive(DefinitionServiceImpl.java:57)
      at org.jbpm.example.ProcessTest.deployProcess(ProcessTest.java:29)
      at org.jbpm.example.ProcessTest.main(ProcessTest.java:79)
      Caused by: java.sql.DataTruncation: Data truncation
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:378)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:620)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:483)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:445)
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:402)
      at com.mchange.v2.c3p0.impl.C3P0PreparedStatement.executeUpdate(C3P0PreparedStatement.java:68)
      at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:469)
      ... 9 more
      java.lang.RuntimeException: couldn't deploy process
      at org.jbpm.example.ProcessTest.deployProcess(ProcessTest.java:33)
      at org.jbpm.example.ProcessTest.main(ProcessTest.java:79)
      Caused by: (net.sf.hibernate.JDBCException) could not insert: [org.jbpm.model.definition.impl.DecisionImpl#45875209]
      at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:60)
      at org.jbpm.impl.DefinitionServiceImpl.deployProcessArchive(DefinitionServiceImpl.java:57)
      at org.jbpm.example.ProcessTest.deployProcess(ProcessTest.java:29)
      ... 1 more
      Caused by: net.sf.hibernate.JDBCException: could not insert: [org.jbpm.model.definition.impl.DecisionImpl#45875209]
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:479)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443)
      at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
      at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
      at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
      at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
      at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:56)
      ... 3 more
      Caused by: java.sql.DataTruncation: Data truncation
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:378)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:620)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:483)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:445)
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:402)
      at com.mchange.v2.c3p0.impl.C3P0PreparedStatement.executeUpdate(C3P0PreparedStatement.java:68)
      at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:469)
      ... 9 more
      Exception in thread "main"
      [img][/img]