- existing Oracle DB for ICAT
- ICAT v4.2.5 deployed on GlassFish
We followed the instructions described at http://icatproject.org/mvn/site/icat/4.3.2/icat.ear/installation.html.
The upgrade of the database schema completed successfully, but while deploying the icat.ear-4.3.2.ear on our Glassfish, there was a huge series of error messages tracing SQL exceptions.
They stated that the table/constraint already existed and we understood that the application was attempting to re-create the database schema.
The options set in icat-core-4.3.2.jar/META-INF/persistence.xml confirmed this assumption:
<property name="eclipselink.ddl-generation" value="create-tables"/>
Which meant that the application was not expecting the database to be already created.
Disabling this option (default value is "none") solved the problem and the application deployed successfully.
Unfortunately, according to EclipseLink documentation for DDL generation, there is no possibility to use something similar to "create-if-not-exists"...
The question is: is there a way to make the database schema creation optional ?