May be you should add an attribute 'schema'.
@Entity @Table(name = "usr", schema = "public", uniqueConstraints = @UniqueConstraint(columnNames = "uname")) ...
I got the same error: table not found.
I found this url http://www.guj.com.br/posts/list/75664.java
Here said that I have to delete the line <property name="hibernate.hbm2ddl.auto" value="validate"/> of the persistence.xml.
But, is this correct?
If you want Seam (that is Hibernate) to create your database schema you have to set that parameter to 'update' or 'create':
<property name="hibernate.hbm2ddl.auto" value="update"/>
Setting to 'validate' it just... well, validate, and the result of the validation is that the table doesn't exist.
If you are trying to map a view you must upgrade hibernate to 3.2.6.
I had to do this in order to keep validate on due to the way postgres reports tables.
I have seen no problems by upgrading JBAS 4.2.3 to this version of hibernate.
Specifically I had to copy the relevant versions of 3.2.6 jars
hibernate3.jar hibernate-annotations.jar hibernate-commons-annotations.jar hibernate-entitymanager.jar hibernate-validator.jar