-
Aug 21st, 2008, 02:56 AM
#1
Error inserting in JBPM_PROCESSINSTANCE
I have the following code:
JbpmTemplate jbpmTemplate = getJbpmTemplate();
ProcessDefinition definition = jbpmTemplate.getProcessDefinition();
assert definition != null;
logger.info("definition: "+definition);
logger.info(" name: " + definition.getName());
listInstances(jbpmTemplate);
ProcessInstance processInstance = definition.createProcessInstance();
assert processInstance != null;
logger.info("processInstance: " + processInstance);
jbpmTemplate.saveProcessInstance(processInstance);
When i execute "saveProcessInstance" i get the following error:
Hibernate: insert into EPTOS.JBPM_TOKEN (ID_, VERSION_, NAME_, START_, END_, NODEENTER_, NEXTLOGINDEX_, ISABLETOREACTIVATEPARENT_, ISTERMINATIONIMPLICIT_, ISSUSPENDED_, LOCK_, NODE_, PROCESSINSTANCE_, PARENT_, SUBPROCESSINSTANCE_) values (default, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: values identity_val_local()
Hibernate: insert into EPTOS.JBPM_PROCESSINSTANCE (ID_, VERSION_, KEY_, START_, END_, ISSUSPENDED_, PROCESSDEFINITION_, ROOTTOKEN_, SUPERPROCESSTOKEN_) values (default, ?, ?, ?, ?, ?, ?, ?, ?)
WARN 08-21 10:54:39,696 SQL Error: -530, SQLState: 23503 JDBCExceptionReporter[77]
ERROR 08-21 10:54:39,697 DB2 SQL error: SQLCODE: -530, SQLSTATE: 23503, SQLERRMC: EPTOS.JBPM_PROCESSINSTANCE.FK_PROCIN_ROOTTKN JDBCExceptionReporter[78]
Any clue?
-
Aug 21st, 2008, 03:32 AM
#2
Please note that if i go to log4j.xml and i switch from:
<root>
<level value="warn" />
to
<root>
<level value="debug" />
It works.
I see no connection but this is the reality.
btw. I use:
springmodules-jbpm 3.1
bpm 3.2.2
i tested also with bpm 3.1.4 but i get the same error.
My applicationContext-jbpm.xml :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=...>
<!-- helper for reading jBPM process definitions -->
<bean id="maintenanceProcess"
class="org.springmodules.workflow.jbpm32.definitio n.ProcessDefinitionFactoryBean">
<property name="definitionLocation"
value="classpath:maintenanceProcess.xml" />
</bean>
<!-- jBPM configuration -->
<bean id="jbpmConfiguration"
class="org.springmodules.workflow.jbpm32.LocalJbpm ConfigurationFactoryBean">
<property name="sessionFactory" ref="sessionFactory" />
<property name="configuration" value="classpath:jbpm.cfg.xml" />
<property name="processDefinitions">
<list>
<ref local="maintenanceProcess" />
</list>
</property>
<property name="createSchema" value="false" />
</bean>
<!-- jBPM template -->
<bean id="jbpmTemplate"
class="org.springmodules.workflow.jbpm32.JbpmTempl ate">
<constructor-arg index="0" ref="jbpmConfiguration" />
<constructor-arg index="1" ref="maintenanceProcess" />
</bean>
</beans>
jbpm.cfg.xml:
<jbpm-configuration>
<jbpm-context>
<service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServ iceFactory" />
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceF actory" />
<service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFacto ry" />
<service name="authentication" factory="org.jbpm.security.authentication.DefaultA uthenticationServiceFactory" />
</jbpm-context>
</jbpm-configuration>
other spring definitions:
<bean id="transactionManager" class="org.springframework.orm.hibernate3.Hibernat eTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!-- transactional methods -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" read-only="false" />
</tx:attributes>
</tx:advice>
<!-- AOP -->
<aop:config>
<aop
ointcut id="bpmMethods" expression="execution(* org.jbpm..*JbpmContext.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="bpmMethods" />
</aop:config>
<bean id="sessionFactory" scope="singleton" class="org.springframework.orm.hibernate3.annotati on.AnnotationSessionFactoryBean">
<property name="dataSource" ref="xxxDS" />
<property name="entityInterceptor" ref="entityInterceptor" />
<property name="annotatedClasses">
<list>
<!-- SAMPLE OBJECT -->
<value>my.model.Foo</value>
</list>
</property>
<property name="mappingResources">
<list>
<!-- jBPM mappings -->
<value>org/jbpm/graph/action/Script.hbm.xml</value>
<value>org/jbpm/db/hibernate.queries.hbm.xml</value>
<!-- graph.action mapping files -->
<value>org/jbpm/graph/action/MailAction.hbm.xml</value>
... <value>org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.DB2D ialect</prop>
<prop key="hibernate.query.substitutions">true 1, false 0, yes 'Y', no 'N'</prop>
<prop key="hibernate.jdbc.batch_size">0</prop>
<prop key="hibernate.jdbc.use_streams_for_binary">true</prop>
<prop key="hibernate.max_fetch_depth">1</prop>
<prop key="hibernate.bytecode.use_reflection_optimizer"> false</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.default_schema">EPTOS</prop>
<prop key="hibernate.connection.release_mode">auto</prop>
<!-- Second Level Cache: Has to be tested properly !-->
<prop key="hibernate.cache.provider_class">org.hibernate .cache.HashtableCacheProvider</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<!-- C3P0 configuration is defined in a separate c3p0.properties file since hibernate PROVIDER_CLASS is not used (datasource initialized externally), -->
</props>
</property>
</bean>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules