I am trying to run schemavalidator Ant task and I get "An AnnotationConfiguration instance is required ... " error.
build.xml:
Code:
<target name="validateschema">
<taskdef name="schemavalidator" classname="org.hibernate.tool.hbm2ddl.SchemaValidatorTask" classpathref="class.path"/>
<schemavalidator config="hibtest.cfg.xml"/>
</target>
hibtest.cfg.xml:
Code:
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">...</property>
<property name="connection.username">...</property>
<property name="connection.password">...</property>
<!-- SQL dialect -->
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="hibernate.current_session_context_class">thread</property>
<mapping class="com.Xpiron.Entities.Borg"/>
<mapping class="com.Xpiron.Entities.TimeZone"/>
</session-factory>
</hibernate-configuration>
Schema validation worked with hbm.xml resources but not with annotated classes.
Does SchemaValidatorTask work with annotations ? Is there a way to tell it to use AnnotationConfiguration ?
Thanks,
Dragisa Krsmanovic