JBoss Community

Problem with Spring and Persistence

created by Gareth Edwards in jBPM - View the full discussion

Hello,

 

I'm creating a jbpm 5.4 web-app.  I am using spring for some restful services.

I have a persistence.xml in META-INF which seems to start up correctly.

The problem manifests when I try to add the following spring bean into my applicationContext.xml

 

  <bean id="jbpmEMF"

       class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">

       <property name="persistenceUnitName" value="org.jbpm.persistence.jta" />

  </bean>

 

The error is:

 

Error creating bean with name 'jbpmEMF' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No persistence unit with name 'org.jbpm.persistence.jta' found

 

It seems like a spring problem as I'm pretty sure that the persistence unit has been created.

 

I'm running jboss from eclipse Juno.

 

Any ideas?

 

Gareth.



Reply to this message by going to Community

Start a new discussion in jBPM at Community