6 Replies Latest reply on Aug 19, 2009 4:08 PM by Ronald van Kuijk

    jBPM 4.0 and

    Ha Wa Newbie

      Given that I was having problems with jBPM 4.0 and Oracle 10g (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=159251), I decided to try MySQL instead but I ran into this issue where jBPM seems to be exporting the workflow/process schema to the DB over and over again and seems to be stuck in some sort of loop? I didn't change my code and it works on jBPM 4.0 CR...

      === Environment ==============================
      - jBPM Version : jBPM 4.0
      - Database : MySQL 5.1.37 (Community)
      - JDK : which Java version are you using? JDK 1.6.0_13
      - Container : java version "1.6.0_13"
      - Configuration :
      jbpm.cfg.xml

      <jbpm-configuration>
       <import resource="jbpm.default.cfg.xml" />
       <import resource="jbpm.jpdl.cfg.xml" />
       <import resource="jbpm.tx.hibernate.cfg.xml" />
       <import resource="jbpm.identity.cfg.xml" />
      </jbpm-configuration>
      


      jbpm.hibernate.cfg.xml
      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE hibernate-configuration PUBLIC
       "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
       "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
      <hibernate-configuration>
       <session-factory>
       <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
       <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
       <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>
       <property name="hibernate.connection.username">jbpm</property>
       <property name="hibernate.connection.password">jbpm</property>
       <property name="hibernate.hbm2ddl.auto">create-drop</property>
       <property name="hibernate.format_sql">true</property>
      
       <mapping resource="jbpm.repository.hbm.xml" />
       <mapping resource="jbpm.execution.hbm.xml" />
       <mapping resource="jbpm.history.hbm.xml" />
       <mapping resource="jbpm.task.hbm.xml" />
       <mapping resource="jbpm.identity.hbm.xml" />
       </session-factory>
      </hibernate-configuration>
      


      - Libraries : My POM includes:
       <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-jpdl</artifactId>
       <version>4.0</version>
       </dependency>
       <dependency>
       <groupId>mysql</groupId>
       <artifactId>mysql-connector-java</artifactId>
       <version>5.1.6</version>
       </dependency>
      


      === Process ==================================
      <?xml version="1.0" encoding="UTF-8"?>
      
      <process name="test" xmlns="http://jbpm.org/4.0/jpdl">
       <decision expr="#{arg}" g="228,336,61,49" name="runJava?">
       <transition g="-4,-20" name="yes" to="java"/>
       <transition g="-5,5" name="no" to="nojava"/>
       </decision>
       <decision expr="#{cond}" g="468,456,49,49" name="condition?">
       <transition g="-11,-18" name="no" to="bad"/>
       <transition g="-21,-3" name="yes" to="good"/>
       </decision>
       <task assignee="cathy" g="60,336,97,49" name="new">
       <transition g="-24,-18" name="to runJava?" to="runJava?"/>
       </task>
       <task assignee="peter" g="276,216,97,49" name="nojava">
       <transition name="to end" to="end" g="-41,-21"/>
       </task>
       <java class="com.hwa.poc.server.App" continue="sync" g="276,456,97,49" method="whatCond" name="java" var="cond">
       <transition g="-40,-18" name="to condition?" to="condition?"/>
       </java>
       <task assignee="cathy" g="612,456,97,49" name="bad">
       <transition g="-21,-16" name="to end" to="end"/>
       </task>
       <task assignee="peter" g="444,336,97,49" name="good">
       <transition name="to end" to="end" g="-41,-21"/>
       </task>
       <end g="636,336,49,49" name="end"/>
       <start g="84,216,49,49" name="start">
       <transition g="7,-11" name="to new" to="new"/>
       </start>
      </process>
      



      === API ===================================
      My constructor App() only gets called once in my code. From then on, I just use runPOC to run instances of the workflow.

       public App() {
       processEngine = new Configuration().buildProcessEngine();
       repositoryService = processEngine.getRepositoryService();
       executionService = processEngine.getExecutionService();
       taskService = processEngine.getTaskService();
       repositoryService.createDeployment().addResourceFromClasspath("test.jpdl.xml").deploy();
       }
      
       public String runPOC(String arg) {
       ProcessInstance processInstance = executionService.startProcessInstanceByKey("test");
      
       List<Task> taskList = taskService.findPersonalTasks("cathy");
       Task task = taskList.get(0);
       long taskDbid = task.getDbid();
       taskService.setVariable(taskDbid, "arg", arg);
       taskService.completeTask(taskDbid);
      
       processInstance = executionService.findProcessInstanceById(pid);
       String result = processInstance.findActiveActivityNames().toArray()[0].toString();
       log.info("Result: " + result);
      }
      



      === Stacktrace ==============================
      17:52:25,051 INFO [Environment] Hibernate 3.3.1.GA
      17:52:25,067 INFO [Environment] hibernate.properties not found
      17:52:25,067 INFO [Environment] Bytecode provider name : javassist
      17:52:25,067 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      17:52:25,176 INFO [Configuration] configuring from resource: jbpm.hibernate.cfg.xml
      17:52:25,176 INFO [Configuration] Configuration resource: jbpm.hibernate.cfg.xml
      17:52:25,192 INFO [Configuration] Reading mappings from resource : jbpm.repository.hbm.xml
      17:52:25,285 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.repository.DeploymentImpl -> JBPM4_DEPLOYMENT
      17:52:25,332 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.repository.DeploymentProperty -> JBPM4_DEPLOYPROP
      17:52:25,363 INFO [Configuration] Reading mappings from resource : jbpm.execution.hbm.xml
      17:52:25,410 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.model.ExecutionImpl -> JBPM4_EXECUTION
      17:52:25,442 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.type.Variable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.DateVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.DoubleVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.HibernateLongVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.LongVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.HibernateStringVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.StringVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.TextVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.NullVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.BlobVariable -> JBPM4_VARIABLE
      17:52:25,488 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.lob.Lob -> JBPM4_LOB
      17:52:25,488 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.job.JobImpl -> JBPM4_JOB
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.job.MessageImpl -> JBPM4_JOB
      17:52:25,488 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.model.op.ExecuteActivityMessage -> JBPM4_JOB
      17:52:25,504 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.model.op.ExecuteEventListenerMessage -> JBPM4_JOB
      17:52:25,504 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.job.CommandMessage -> JBPM4_JOB
      17:52:25,504 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.job.TimerImpl -> JBPM4_JOB
      17:52:25,504 INFO [Configuration] Reading mappings from resource : jbpm.history.hbm.xml
      17:52:25,535 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl -> JBPM4_HIST_PROCINST
      17:52:25,535 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl -> JBPM4_HIST_ACTINST
      17:52:25,551 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryAutomaticInstanceImpl -> JBPM4_HIST_ACTINST
      17:52:25,551 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryDecisionInstanceImpl -> JBPM4_HIST_ACTINST
      17:52:25,551 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl -> JBPM4_HIST_ACTINST
      17:52:25,551 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryTaskImpl -> JBPM4_HIST_TASK
      17:52:25,551 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryVariableImpl -> JBPM4_HIST_VAR
      17:52:25,567 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryDetailImpl -> JBPM4_HIST_DETAIL
      17:52:25,567 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryCommentImpl -> JBPM4_HIST_DETAIL
      17:52:25,567 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryPriorityUpdateImpl -> JBPM4_HIST_DETAIL
      17:52:25,567 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryTaskAssignmentImpl -> JBPM4_HIST_DETAIL
      17:52:25,567 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryTaskDuedateUpdateImpl -> JBPM4_HIST_DETAIL
      17:52:25,567 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryVariableUpdateImpl -> JBPM4_HIST_DETAIL
      17:52:25,567 INFO [Configuration] Reading mappings from resource : jbpm.task.hbm.xml
      17:52:25,598 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.task.TaskImpl -> JBPM4_TASK
      17:52:25,629 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.task.ParticipationImpl -> JBPM4_PARTICIPATION
      17:52:25,629 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.task.SwimlaneImpl -> JBPM4_SWIMLANE
      17:52:25,645 INFO [Configuration] Reading mappings from resource : jbpm.identity.hbm.xml
      17:52:25,660 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.identity.impl.UserImpl -> JBPM4_ID_USER
      17:52:25,660 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.identity.impl.MembershipImpl -> JBPM4_ID_MEMBERSHIP
      17:52:25,660 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.identity.impl.GroupImpl -> JBPM4_ID_GROUP
      17:52:25,660 INFO [Configuration] Configured SessionFactory: null
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.repository.DeploymentImpl.resources -> JBPM4_LOB
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.repository.DeploymentImpl.objectProperties -> JBPM4_DEPLOYPROP
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.model.ExecutionImpl.variables -> JBPM4_VARIABLE
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.model.ExecutionImpl.systemVariables -> JBPM4_VARIABLE
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.model.ExecutionImpl.executions -> JBPM4_EXECUTION
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.model.ExecutionImpl.swimlanes -> JBPM4_SWIMLANE
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl.historyActivityInstances -> JBPM4_HI
      ST_ACTINST
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl.historyVariables -> JBPM4_HIST_VAR
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl.details -> JBPM4_HIST_DETAIL
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl.details -> JBPM4_HIST_DETAIL
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryTaskImpl.details -> JBPM4_HIST_DETAIL
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryTaskImpl.historyVariables -> JBPM4_HIST_VAR
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryTaskImpl.subTasks -> JBPM4_HIST_TASK
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryVariableImpl.details -> JBPM4_HIST_DETAIL
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryCommentImpl.replies -> JBPM4_HIST_DETAIL
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.task.TaskImpl.participations -> JBPM4_PARTICIPATION
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.task.TaskImpl.variables -> JBPM4_VARIABLE
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.task.TaskImpl.subTasks -> JBPM4_TASK
      17:52:25,676 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.task.SwimlaneImpl.participations -> JBPM4_PARTICIPATION
      17:52:25,707 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
      17:52:25,707 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 20
      17:52:25,707 INFO [DriverManagerConnectionProvider] autocommit mode: false
      17:52:25,723 INFO [DriverManagerConnectionProvider] using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/jbpmdb
      17:52:25,723 INFO [DriverManagerConnectionProvider] connection properties: {user=jbpm, password=****}
      17:52:25,957 INFO [SettingsFactory] RDBMS: MySQL, version: 5.1.37-community
      17:52:25,957 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} )
      17:52:25,988 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
      17:52:25,988 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
      17:52:25,988 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional se
      cond-level cache is not recommended)
      17:52:25,988 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
      17:52:25,988 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
      17:52:26,004 INFO [SettingsFactory] JDBC batch size: 15
      17:52:26,004 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
      17:52:26,004 INFO [SettingsFactory] Scrollable result sets: enabled
      17:52:26,004 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
      17:52:26,004 INFO [SettingsFactory] Connection release mode: auto
      17:52:26,004 INFO [SettingsFactory] Maximum outer join fetch depth: 2
      17:52:26,004 INFO [SettingsFactory] Default batch fetch size: 1
      17:52:26,004 INFO [SettingsFactory] Generate SQL with comments: disabled
      17:52:26,004 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      17:52:26,004 INFO [SettingsFactory] Order SQL inserts for batching: disabled
      17:52:26,004 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      17:52:26,004 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      17:52:26,004 INFO [SettingsFactory] Query language substitutions: {}
      17:52:26,004 INFO [SettingsFactory] JPA-QL strict compliance: disabled
      17:52:26,004 INFO [SettingsFactory] Second-level cache: enabled
      17:52:26,004 INFO [SettingsFactory] Query cache: disabled
      17:52:26,004 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
      17:52:26,004 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
      17:52:26,004 INFO [SettingsFactory] Structured second-level cache entries: disabled
      17:52:26,020 INFO [SettingsFactory] Statistics: disabled
      17:52:26,020 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      17:52:26,020 INFO [SettingsFactory] Default entity-mode: pojo
      17:52:26,020 INFO [SettingsFactory] Named query checking : enabled
      17:52:26,082 INFO [SessionFactoryImpl] building session factory
      17:52:26,676 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      17:52:26,676 INFO [SchemaExport] Running hbm2ddl schema export
      17:52:26,692 INFO [SchemaExport] exporting generated schema to database
      17:52:28,895 INFO [SchemaExport] schema export complete
      17:52:29,442 INFO [Configuration] configuring from resource: jbpm.hibernate.cfg.xml
      17:52:29,442 INFO [Configuration] Configuration resource: jbpm.hibernate.cfg.xml
      17:52:29,457 INFO [Configuration] Reading mappings from resource : jbpm.repository.hbm.xml
      17:52:29,535 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.repository.DeploymentImpl -> JBPM4_DEPLOYMENT
      17:52:29,535 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.repository.DeploymentProperty -> JBPM4_DEPLOYPROP
      17:52:29,535 INFO [Configuration] Reading mappings from resource : jbpm.execution.hbm.xml
      17:52:29,567 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.model.ExecutionImpl -> JBPM4_EXECUTION
      17:52:29,567 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.type.Variable -> JBPM4_VARIABLE
      17:52:29,567 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.DateVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.DoubleVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.HibernateLongVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.LongVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.HibernateStringVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.StringVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.TextVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.NullVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.type.variable.BlobVariable -> JBPM4_VARIABLE
      17:52:29,582 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.lob.Lob -> JBPM4_LOB
      17:52:29,582 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.job.JobImpl -> JBPM4_JOB
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.job.MessageImpl -> JBPM4_JOB
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.model.op.ExecuteActivityMessage -> JBPM4_JOB
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.model.op.ExecuteEventListenerMessage -> JBPM4_JOB
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.job.CommandMessage -> JBPM4_JOB
      17:52:29,582 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.job.TimerImpl -> JBPM4_JOB
      17:52:29,582 INFO [Configuration] Reading mappings from resource : jbpm.history.hbm.xml
      17:52:29,614 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl -> JBPM4_HIST_PROCINST
      17:52:29,614 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl -> JBPM4_HIST_ACTINST
      17:52:29,614 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryAutomaticInstanceImpl -> JBPM4_HIST_ACTINST
      17:52:29,629 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryDecisionInstanceImpl -> JBPM4_HIST_ACTINST
      17:52:29,629 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl -> JBPM4_HIST_ACTINST
      17:52:29,629 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryTaskImpl -> JBPM4_HIST_TASK
      17:52:29,629 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryVariableImpl -> JBPM4_HIST_VAR
      17:52:29,629 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.history.model.HistoryDetailImpl -> JBPM4_HIST_DETAIL
      17:52:29,629 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryCommentImpl -> JBPM4_HIST_DETAIL
      17:52:29,629 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryPriorityUpdateImpl -> JBPM4_HIST_DETAIL
      17:52:29,629 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryTaskAssignmentImpl -> JBPM4_HIST_DETAIL
      17:52:29,645 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryTaskDuedateUpdateImpl -> JBPM4_HIST_DETAIL
      17:52:29,645 INFO [HbmBinder] Mapping subclass: org.jbpm.pvm.internal.history.model.HistoryVariableUpdateImpl -> JBPM4_HIST_DETAIL
      17:52:29,645 INFO [Configuration] Reading mappings from resource : jbpm.task.hbm.xml
      17:52:29,660 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.task.TaskImpl -> JBPM4_TASK
      17:52:29,692 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.task.ParticipationImpl -> JBPM4_PARTICIPATION
      17:52:29,692 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.task.SwimlaneImpl -> JBPM4_SWIMLANE
      17:52:29,707 INFO [Configuration] Reading mappings from resource : jbpm.identity.hbm.xml
      17:52:29,707 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.identity.impl.UserImpl -> JBPM4_ID_USER
      17:52:29,707 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.identity.impl.MembershipImpl -> JBPM4_ID_MEMBERSHIP
      17:52:29,707 INFO [HbmBinder] Mapping class: org.jbpm.pvm.internal.identity.impl.GroupImpl -> JBPM4_ID_GROUP
      17:52:29,707 INFO [Configuration] Configured SessionFactory: null
      17:52:29,707 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.repository.DeploymentImpl.resources -> JBPM4_LOB
      17:52:29,707 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.repository.DeploymentImpl.objectProperties -> JBPM4_DEPLOYPROP
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.model.ExecutionImpl.variables -> JBPM4_VARIABLE
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.model.ExecutionImpl.systemVariables -> JBPM4_VARIABLE
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.model.ExecutionImpl.executions -> JBPM4_EXECUTION
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.model.ExecutionImpl.swimlanes -> JBPM4_SWIMLANE
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl.historyActivityInstances -> JBPM4_HI
      ST_ACTINST
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl.historyVariables -> JBPM4_HIST_VAR
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl.details -> JBPM4_HIST_DETAIL
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl.details -> JBPM4_HIST_DETAIL
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryTaskImpl.details -> JBPM4_HIST_DETAIL
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryTaskImpl.historyVariables -> JBPM4_HIST_VAR
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryTaskImpl.subTasks -> JBPM4_HIST_TASK
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryVariableImpl.details -> JBPM4_HIST_DETAIL
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.history.model.HistoryCommentImpl.replies -> JBPM4_HIST_DETAIL
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.task.TaskImpl.participations -> JBPM4_PARTICIPATION
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.task.TaskImpl.variables -> JBPM4_VARIABLE
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.task.TaskImpl.subTasks -> JBPM4_TASK
      17:52:29,723 INFO [HbmBinder] Mapping collection: org.jbpm.pvm.internal.task.SwimlaneImpl.participations -> JBPM4_PARTICIPATION
      17:52:29,723 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
      17:52:29,739 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 20
      17:52:29,739 INFO [DriverManagerConnectionProvider] autocommit mode: false
      17:52:29,739 INFO [DriverManagerConnectionProvider] using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/jbpmdb
      17:52:29,739 INFO [DriverManagerConnectionProvider] connection properties: {user=jbpm, password=****}
      17:52:29,754 INFO [SettingsFactory] RDBMS: MySQL, version: 5.1.37-community
      17:52:29,754 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} )
      17:52:29,754 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
      17:52:29,754 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
      17:52:29,754 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional se
      cond-level cache is not recommended)
      17:52:29,754 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
      17:52:29,754 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
      17:52:29,754 INFO [SettingsFactory] JDBC batch size: 15
      17:52:29,754 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
      17:52:29,754 INFO [SettingsFactory] Scrollable result sets: enabled
      17:52:29,754 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
      17:52:29,754 INFO [SettingsFactory] Connection release mode: auto
      17:52:29,754 INFO [SettingsFactory] Maximum outer join fetch depth: 2
      17:52:29,754 INFO [SettingsFactory] Default batch fetch size: 1
      17:52:29,770 INFO [SettingsFactory] Generate SQL with comments: disabled
      17:52:29,770 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      17:52:29,770 INFO [SettingsFactory] Order SQL inserts for batching: disabled
      17:52:29,770 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      17:52:29,770 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      17:52:29,770 INFO [SettingsFactory] Query language substitutions: {}
      17:52:29,770 INFO [SettingsFactory] JPA-QL strict compliance: disabled
      17:52:29,785 INFO [SettingsFactory] Second-level cache: enabled
      17:52:29,785 INFO [SettingsFactory] Query cache: disabled
      17:52:29,785 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
      17:52:29,785 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
      17:52:29,785 INFO [SettingsFactory] Structured second-level cache entries: disabled
      17:52:29,785 INFO [SettingsFactory] Statistics: disabled
      17:52:29,785 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      17:52:29,801 INFO [SettingsFactory] Default entity-mode: pojo
      17:52:29,801 INFO [SettingsFactory] Named query checking : enabled
      17:52:29,801 INFO [SessionFactoryImpl] building session factory
      17:52:29,926 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      17:52:29,926 INFO [SchemaExport] Running hbm2ddl schema export
      17:52:29,926 INFO [SchemaExport] exporting generated schema to database
      17:53:21,318 SEVERE [SchemaExport] Unsuccessful: create table JBPM4_DEPLOYMENT (DBID_ bigint not null auto_increment, NAME_ longtext, TIMESTAMP_ bigin
      t, STATE_ varchar(255), primary key (DBID_)) type=InnoDB
      17:53:21,318 SEVERE [SchemaExport] Table 'jbpm4_deployment' already exists
      17:53:22,974 INFO [SchemaExport] schema export complete
      


      === Problem description =========================
      It seems to start like normal, but then it exports the schema in some infinite loop (I only call my App constructor once and there are no loops in my code) and keep giving me this SEVERE error: Table 'jbpm4_deployment' already exists. What's going on? Is there something specific to MySQL (or MySQL 5) that I need to configure to work appropriately with jBPM 4? Thanks in advance.