I am using
<property name="hibernate.hbm2ddl.auto" value="create" />
in my persistence.xml for my integration test, and when I run the integration test, I get
ERROR SchemaExport:386 - Unsuccessful: create table tableName ...
ERROR SchemaExport:387 - Table 'tableName' already exists
but isn’t hbm2ddl.auto=create supposed to replace the table if it already exists? Why would I be getting this error?
By the way, this was working as expected last week, so I’m really confused about why I’d be getting this error all of a sudden.
I ended up manually writing and executing SQL statements to drop and recreate the schema, and then it worked again as expected. I never did figure out why Hibernate wouldn’t drop and recreate the existing tables, and it hasn’t happened again since.