[jboss-user] [jBPM] - JBPM 4.3 - org.jbpm.api.JbpmException: couldn't acquire block of ids

Stefano Campanini do-not-reply at jboss.com
Fri Apr 23 07:55:12 EDT 2010


Stefano Campanini [http://community.jboss.org/people/campa] replied to the discussion

"JBPM 4.3 - org.jbpm.api.JbpmException: couldn't acquire block of ids"

To view the discussion, visit: http://community.jboss.org/message/539201#539201

--------------------------------------------------------------
Hi  http://community.jboss.org/people/swiderski.maciej Maciej

I'm integratig JBPM into webapp based on Spring 3.0 all thing are managed using spring. Here sono details:
Datasource is DBCP via JNDI
TransactionManager is managed by spring
Persistace is Spring and Ibatis based
HBMSession, used only for jbpm, is configured as this

<bean id="sessionFactory" >
        <property name="dataSource" ref="appDataSource" />
        <property name="useTransactionAwareDataSource" value="true" /> <!--  it use transaciton spring managed -->
        <property name="hibernateProperties">
          <value>
            hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
            hibernate.hbm2ddl.auto=update
            hibernate.format_sql=true
            hibernate.show_sql=true
          </value>
        </property>
        <property name="mappingLocations">
            <list>
                <value>classpath:jbpm.execution.hbm.xml</value>
                <value>classpath:jbpm.repository.hbm.xml</value>
                <value>classpath:jbpm.task.hbm.xml</value>
                <value>classpath:jbpm.history.hbm.xml</value>
                <value>classpath:jbpm.identity.hbm.xml</value>
            </list>
        </property>
    </bean>

JBPM Spring iontegration is done using jbpm community way:

<bean id="springJbpmHelper" name="springHelper" >
       <property name="jbpmCfg" value="conf/jbpm.cfg.xml" />
</bean>    
<bean id="processEngine" factory-bean="springJbpmHelper" factory-method="createProcessEngine" />

My JBPMConfiguration is here:

<jbpm-configuration>
    <!--  <import resource="jbpm.default.cfg.xml" />-->
    <!--
        jbpm.default.cfg.xml , modified <repository-cache /> with <object
        class="org.jbpm.pvm.internal.repository.RepositoryCacheImpl" />
    -->
    <import resource="jbpm.default.scriptmanager.xml" />
    <process-engine-context>
        <repository-service />
        <!--    <repository-cache /> -->
        <object />
        <execution-service />
        <history-service />
        <management-service />
        <identity-service />
        <task-service />
        <object>
            <field name="commandService">
                <ref object="txRequiredCommandService" />
            </field>
        </object>
        <object  init="eager" />
        <types resource="jbpm.variable.types.xml" />
        <address-resolver />
        <mail-template name='task-notification'>
            <to users="${task.assignee}" />
            <subject>${task.name}</subject>
            <text><![CDATA[Hi ${task.assignee}, Task "${task.name}" has been assigned to you. ${task.description}
                        Sent by JBoss jBPM ]]></text>
        </mail-template>

        <mail-template name='task-reminder'>
            <to users="${task.assignee}" />
            <subject>${task.name}</subject>
            <text><![CDATA[Hey ${task.assignee}, Do not forget about task "${task.name}". ${task.description}
                        Sent by JBoss jBPM
            ]]></text>
        </mail-template>
    </process-engine-context>

    <transaction-context>
        <repository-session />
        <db-session />
        <message-session />
        <timer-session />
        <history-sessions>
            <object />
        </history-sessions>
        <mail-session>
            <mail-server>
                <session-properties resource="jbpm.mail.properties" />
            </mail-server>
        </mail-session>
    </transaction-context>

    <!--  <import resource="jbpm.variable.types.cfg.xml" /> -->
    <import resource="jbpm.jpdl.cfg.xml" />
    <import resource="jbpm.tx.spring.cfg.xml" />
    <import resource="jbpm.identity.cfg.xml" />

</jbpm-configuration>

The issue is present also on junit testing or using the webapp ...
Junit testing enviroment is based on AbstractJUnit4SpringContextTests .

Here some sql printed by hibernate, as you asked:

Hibernate: 
    select
        propertyim0_.KEY_ as KEY1_6_,
        propertyim0_.VERSION_ as VERSION2_6_,
        propertyim0_.VALUE_ as VALUE3_6_ 
    from
        JBPM4_PROPERTY propertyim0_ limit ?
Hibernate: 
    select
        this_.KEY_ as KEY1_6_0_,
        this_.VERSION_ as VERSION2_6_0_,
        this_.VALUE_ as VALUE3_6_0_ 
    from
        JBPM4_PROPERTY this_ 
    where
        this_.KEY_=?
Hibernate: 
    select
        this_.KEY_ as KEY1_6_0_,
        this_.VERSION_ as VERSION2_6_0_,
        this_.VALUE_ as VALUE3_6_0_ 
    from
        JBPM4_PROPERTY this_ 
    where
        this_.KEY_=?
Hibernate: 
    insert 
    into
        JBPM4_PROPERTY
        (VERSION_, VALUE_, KEY_) 
    values
        (?, ?, ?)
Hibernate: 
    select
        this_.KEY_ as KEY1_6_0_,
        this_.VERSION_ as VERSION2_6_0_,
        this_.VALUE_ as VALUE3_6_0_ 
    from
        JBPM4_PROPERTY this_ 
    where
        this_.KEY_=?

Hibernate: 
    select
        propertyim0_.KEY_ as KEY1_6_,
        propertyim0_.VERSION_ as VERSION2_6_,
        propertyim0_.VALUE_ as VALUE3_6_ 
    from
        JBPM4_PROPERTY propertyim0_ 
    where
        propertyim0_.KEY_='next.dbid'

Do you see something wrong ?

Thanks in advance.
Stefano

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/539201#539201]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100423/397e2384/attachment.html 


More information about the jboss-user mailing list