I am attempting to generate a schema with the method below.
During testing, the "annotationConfiguration" parameter contains 3 annotated classes (within the annotatedClasses ArrayList of the AnnotationConfiguration object).
After instantiating a new SchemaExport, each of these annotated classes is set to null; and the create method neiither prints output to the console, nor creates the schema in the file indicated by the "fileName" parameter.
Any suggestions?
Thanks
Charlie Kelly
**************************************************************
protected static void exportSchemaToFile(String fileName, AnnotationConfiguration annotationConfiguration) throws Exception
{
try
{
SchemaExport schemaExport = new SchemaExport (annotationConfiguration);
schemaExport.setDelimiter(PersistenceController.SCHEMA_DELIMITER);
schemaExport.setOutputFile(fileName);
boolean script = true; // - print the DDL to the console
boolean export = true; // - export the script to the database
schemaExport.create(script, export);
}// try
catch (Exception e)
{
PersistenceLogger.logError (e.toString(), e);
throw new Exception (e);
}// catch (Exception e)
}//
|