org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'departmentServiceImpl': Injection of resource methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating
'departmentServiceImpl'是jbpm.jar里面的repository.hbm.xml里定义的,言外之意spring没有找到jbpm.jar里面的repository.hbm.xml
当时beans.xml我是这么定义的
<bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="myDataSource"/>
<property name="mappingResources">
<list>
<value>/jbpm/repository.hbm.xml</value>
.........
之后我改成了
<value>jbpm.repository.hbm.xml</value>
就没问题了
其实你可以查看
jbpm里面jbpm.hibernate.cfg.xml是怎么写的。
<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" />