[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Persistence Manager Exception

galo.navarro do-not-reply at jboss.com
Thu Aug 24 09:12:42 EDT 2006


"Holy Joe" wrote : Try replacing the PersistenceContext annotation with
  | 
  | 
  |   | @PersistenceContext(unitName="BeanExamples")
  |   | 
  | 
  | We had the same error message, and that made it go away, although I don't know why.
  | 

Thanks, that was the problem actually. As far as I've understood if persistence.xml defines only one unit, this will be used by default and you don't need to specify it in the annotation. 

Now I've got @PersistenceContext alone with this persistence.xml and everything works fine. Thanks for your help.

<persistence>
  |  <persistence-unit name="BeanExamples">
  |  <jta-data-source>java:/DefaultDS</jta-data-source>
  |  <properties>
  |  <property name="hibernate.hbm2ddl.auto" value="update"/>
  |  </properties>
  |  </persistence-unit>
  | </persistence>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967222#3967222

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967222



More information about the jboss-user mailing list