sounds like wrong db or persistence not being loaded.
If using Studio to generate project click edit in initial wizard and go to driver properties and make sure those are in fact your db. Make sure when deploying app that you see it found in the hibernate log.
If using JBoss 5 make sure you are retrieving your entityManagerFactory from JNDI.
<property name="jboss.entity.manager.factory.jndi.name" value="java:/myEntityManagerFactory"/>
<persistence:entity-manager-factory name="myDatabase" installed="@loadPersistenceUnits@"/>
<persistence:managed-persistence-context name="em" auto-create="true"
Hope that helps!
Thank you very much Robert. None of the lines where in my files. I added them, but on
I got the error
The prefix "transaction" for element "transaction:entity-transaction" is not bound
I run the application witouth this line and got the same error as before.
I wonder what am I doing wrong if my setup is wrong.
That is referring to binding the namespace in your components.xml header. All the Seam namespaces are fairly "common" sense approach. So anytime you need a Seam namespace it follows the pattern http://jboss.com/products/seam/[mynamespace]
If that's not working for you... Post your log on deploy to see what isn't getting bound. You should see your Table's in the hibernate log on deploy.
Oh... and by the way... I find Jboss 4.2x to play nicer with Seam 2.2 before you dig into all the intricacies of Seam. So if your not tied to JBoss 5 in the immmediate future your auto seam gen process may work a little smoother for you. Just a thought.
Thank you very much again, but still it does't work.