I see a few people are having this problem, but it is not pointing me in any direction. I have set up Jbpm per the docs and have a workflowDAO object that takes the JbpmTemplate via a DI method. This DAO is then used by a service level object which is injected into various Spring MVC controllers. Unfortunately when the application context is almost done starting up in my tomcat server, I get the error:
"a beanFactoryReference already exists for key jbpmConfiguration"
I have been running jBPM 3.0 for a while and now am migrating to 3.1, but this is keeping me from running my local dev server properly. Any pointers are greatly appreciated. Below are snippets from my springapp-*.xml files.
Thanks for any input,
Julian
Spring 2.0.2
Jbpm 3.1.4
Spring-modules 0.7
Java 5
Tomcat 5.5.x
Root springapp file (has import statements to other springapp-* files for other beans:
springapp-data-access.xmlCode:... <bean id="hibernateSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="workflowDataSource"/> </property> <property name="mappingLocations"> <value>classpath*:/org/jbpm/**/*.hbm.xml</value> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop> <prop key="hibernate.show_sql">false</prop> <prop key="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</prop> </props> </property> <property name="schemaUpdate" value="true"/> </bean> <!-- jBPM configuration --> <bean id="jbpmConfiguration" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean"> <property name="sessionFactory" ref="hibernateSessionFactory"/> <property name="configuration" value="classpath:jbpm.cfg.xml"/> <property name="createSchema" value="true"/> </bean> <!-- jBPM template --> <bean id="jbpmTemplate" class="org.springmodules.workflow.jbpm31.JbpmTemplate"> <constructor-arg index="0" ref="jbpmConfiguration"/> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="hibernateSessionFactory"/> </bean> <bean id="manager" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager" ref="transactionManager"/> <property name="target" ref="jbpmTemplate"/> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED, ISOLATION_READ_COMMITTED</prop> </props> </property> </bean> ...
And again various service level beans and MVC controller's use the workflowDAO via DI methods.Code:... <bean id="workflowDataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="java:comp/env/jdbc/workflow"/> </bean> <bean id="workflowDAO" class="com.ethidium.wEMR.dao.WorkflowDAO"> <property name="jbpmTemplate" ref="jbpmTemplate"/> </bean> ...


