During the startup of Jboss server, I get the following stacktrace. I wonder why JPA is trying to alter tables that seem to be fine and how to get passed these ERROR messages. Thanks
2009-08-03 11:28:49,683 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] Unsuccessful: alter table BDPARAMS add constraint FK61733C48FA34BFDC foreign key (ITEMID) references RTELEMENT 2009-08-03 11:28:49,683 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] Unsuccessful: alter table BDPARAMS add constraint FK61733C48FA34BFDC foreign key (ITEMID) references RTELEMENT 2009-08-03 11:28:49,683 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] ORA-02275: such a referential constraint already exists in the table
2009-08-03 11:28:49,683 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] ORA-02275: such a referential constraint already exists in the table
2009-08-03 11:28:49,745 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] Unsuccessful: alter table CONTENTITEM add constraint FK692B5EEC44F32395 foreign key (parent_id) references CONTENTLOCATION 2009-08-03 11:28:49,745 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] Unsuccessful: alter table CONTENTITEM add constraint FK692B5EEC44F32395 foreign key (parent_id) references CONTENTLOCATION 2009-08-03 11:28:49,745 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] ORA-02275: such a referential constraint already exists in the table
In my case, the problem solved when I added the default_schema name to Hibernate configuration file:
<property name="hibernate.default_schema" value="db_default_schema_name" />
Specifically, in Play framework 2.4, I added the above line to conf\META-INF\persistence.xml
file.
Hibernate version used: 4.3.11