Thanks Mars1412, the continent example did help. I was missing the schema definition for
persistence, very obvious now that I look at my last error message again.
For anyone who is having a similar problem, my persistence.xml is now:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <persistence>
| <persistence-unit name="MovieDataSource">
| <provider>
| org.hibernate.ejb.HibernatePersistence
| </provider>
| <jta-data-source>
| java:/MovieDataSource
| </jta-data-source>
| <properties>
| <property name="jboss.entity.manager.factory.jndi.name"
value="java:/EntityManagerFactories/em"/>
| <property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect" />
| <property name="hibernate.hbm2ddl.auto"
value="create-drop" />
| </properties>
| </persistence-unit>
| </persistence>
|
my components.xml is:
| <?xml version="1.0" encoding="UTF-8"?>
| <components
xmlns="http://jboss.com/products/seam/components"
|
xmlns:core="http://jboss.com/products/seam/core"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:persistence="http://jboss.com/products/seam/persistence"
| xsi:schemaLocation=
| "http://jboss.com/products/seam/core
|
http://jboss.com/products/seam/core-2.0.xsd
|
http://jboss.com/products/seam/components
|
http://jboss.com/products/seam/components-2.0.xsd
|
http://jboss.com/products/seam/persistence
http://jboss.com/products/seam/persistence-2.0.xsd">
|
| <core:init jndi-pattern="moviedb/#{ejbName}/local"
debug="true"/>
|
| <core:manager conversation-timeout="120000"/>
|
| <persistence:managed-persistence-context name="em"
| auto-create="true"
|
persistence-unit-jndi-name="java:/EntityManagerFactories/em"/>
|
| <component name="org.jboss.seam.ui.EntityConverter">
| <property name="entityManager">#{em}</property>
| </component>
|
| </components>
|
I think the entityConverter Pete said I needed to use expects an entity manager to be
injected by seam and named entityManager. I have called mine em so I don't have to
change too much code, but this means the last component is needed to join the names
together.
Thanks all for your help,
Dave
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118327#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...