I am setting up a project that uses hibernate, and I am writing the classes and adding annotations to avoid writing .hbm.xml files. I am also trying to use maven hibernate3 plugin specifically hbm2dao and hbm2ddl for dao and database creation but I get the error
failed: Unable to load class declared as <mapping class=package.ClassName.....
hibernate.cfg.xml follows:
<hibernate-configuration>
<session-factory name="jndi/composite/SessionFactory">
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.connection.autocommit">false</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">PASS</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/DATABASE</property>
<property name="hibernate.connection.username">USER</property>
<property name="hibernate.current_session_context_class">thread</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory </property>
<property name="hibernate.use_sql_comments">true</property>
<mapping class="package.....models.User"/>
</session-factory>
</hibernate-configuration>
configuration for the plugin on pom.xml
<configuration>
<components>
<component>
<name>hbm2dao</name>
<implementation>annotationconfiguration</implementation>
<outputDirectory>target/generated-sources/hibernate3</outputDirectory>
</component>
</components>
<componentProperties>
<jdk5>true</jdk5>
<ejb3>false</ejb3>
<packagename>package......models</packagename>
<format>true</format>
<haltonerror>true</haltonerror>
<scan-classes>true</scan-classes>
</componentProperties>
</configuration>
Any info that I may be forgetting just ask, thanks.