I'm trying to create the database schema with an ant task
Code:
<project name="ro" default="schemaexport" basedir=".">
<!-- Name of project and version -->
<property name="project.name" value="ro"/>
<property name="project.shortname" value="ro"/>
<property name="version" value="201007"/>
<!-- Global properties for this build -->
<property name="lib.dir" value="WebContent/WEB-INF/lib"/>
<property name="build.dir" value="build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<!-- Classpath declaration -->
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${build.classes.dir}">
<include name="*.class"/>
</fileset>
</path>
<target name="schemaexport">
<taskdef name="schemaexport" classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" classpathref="project.classpath"/>
<schemaexport properties="hibernate.properties" create="yes" quiet="no" text="yes" drop="no" delimiter=";" output="schema-export.sql">
<fileset dir="src">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>
</project>
And I get the following error:
Buildfile: /home/henry/workspace/JPAHibernate/RemOpt/ant-tasks.xml
schemaexport:
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Environment <clinit>
[schemaexport] INFO: Hibernate 3.3.1.GA
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Environment <clinit>
[schemaexport] INFO: hibernate.properties not found
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Environment buildBytecodeProvider
[schemaexport] INFO: Bytecode provider name : javassist
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Environment <clinit>
[schemaexport] INFO: using JDK 1.4 java.sql.Timestamp handling
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Activity.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Activity -> ACTIVITY
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/ActivityForecast.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.ActivityForecast -> ACTIVITY_FORECAST
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/ActivityUnit.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.ActivityUnit -> ACTIVITY_UNIT
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Address.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Address -> ADDRESS
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/AssignedActivity.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.AssignedActivity -> ASSIGNED_ACTIVITY
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/City.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.City -> CITY
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Country.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Country -> COUNTRY
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Customer.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Customer -> CUSTOMER
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindJoinedSubclass
[schemaexport] INFO: Mapping joined-subclass: ro.model.Operator -> OPERATOR
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindJoinedSubclass
[schemaexport] INFO: Mapping joined-subclass: ro.model.Vendor -> VENDOR
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Expense.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Expense -> EXPENSE
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Forecast.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Forecast -> FORECAST
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Message.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Message -> MESSAGE
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindCollection
[schemaexport] INFO: Mapping collection: ro.model.Message.files -> FILE
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Project.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Project -> PROJECT
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindCollection
[schemaexport] INFO: Mapping collection: ro.model.Project.internals -> PROJECT_INTERNAL
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindCollection
[schemaexport] INFO: Mapping collection: ro.model.Project.externals -> PROJECT_EXTERNAL
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/State.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.State -> STATE
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/Subsystem.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.Subsystem -> SUBSYSTEM
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/model/User.hbm.xml
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemaexport] INFO: Mapping class: ro.model.User -> USER
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindCollection
[schemaexport] INFO: Mapping collection: ro.model.User.authorities -> AUTHORITY
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindJoinedSubclass
[schemaexport] INFO: Mapping joined-subclass: ro.model.Professional -> PROFESSIONAL
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindCollection
[schemaexport] INFO: Mapping collection: ro.model.Professional.profilePhotos -> PROFILE_PHOTO
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindJoinedSubclass
[schemaexport] INFO: Mapping joined-subclass: ro.model.Internal -> INTERNAL
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindCollection
[schemaexport] INFO: Mapping collection: ro.model.Internal.projects -> PROJECT_INTERNAL
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindJoinedSubclass
[schemaexport] INFO: Mapping joined-subclass: ro.model.External -> EXTERNAL
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.HbmBinder bindCollection
[schemaexport] INFO: Mapping collection: ro.model.External.projects -> PROJECT_EXTERNAL
[schemaexport] Jul 17, 2010 4:40:32 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/persistence/DynamicFilters.hbm.xml
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/persistence/NamedQueries.hbm.xml
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Reading mappings from file: /home/henry/workspace/JPAHibernate/RemOpt/src/ro/persistence/UserTypes.hbm.xml
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.dialect.Dialect <init>
[schemaexport] INFO: Using dialect: org.hibernate.dialect.PostgreSQLDialect
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Activity.assignedActivities -> ASSIGNED_ACTIVITY
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Activity.forecastedActivities -> ACTIVITY_FORECAST
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.ActivityUnit.activities -> ACTIVITY
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.AssignedActivity.messages -> MESSAGE
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.City.addresses -> ADDRESS
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Country.addresses -> ADDRESS
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Country.states -> STATE
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Operator.projects -> PROJECT
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Vendor.projects -> PROJECT
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Vendor.externals -> EXTERNAL
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Vendor.subsystems -> SUBSYSTEM
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Forecast.activitiesForecast -> ACTIVITY_FORECAST
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Project.assignedActivities -> ASSIGNED_ACTIVITY
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.State.addresses -> ADDRESS
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.State.cities -> CITY
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Subsystem.activities -> ACTIVITY
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Professional.messages -> MESSAGE
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Internal.projectsAsCoordinator -> PROJECT
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Internal.assignedActivities -> ASSIGNED_ACTIVITY
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.Internal.expenses -> EXPENSE
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.External.projectsAsProjectManager -> PROJECT
[schemaexport] Jul 17, 2010 4:40:33 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass
[schemaexport] INFO: Mapping collection: ro.model.External.askedActivities -> ASSIGNED_ACTIVITY
BUILD FAILED
/home/henry/workspace/JPAHibernate/RemOpt/ant-tasks.xml:25: Schema text failed: component class not found: ro.model.AssignedActivity$Id
Total time: 1 second
What can I do?