Thanks for the replies. But it still throws the same exception. I did already place the config option in my ant task the previous time.
So I still make a mistake somewhere. Question is: where?
build.xml
Code:
<target name="hbm2java" description="Generate .java from .hbm files." depends="compile-hibernate">
<mkdir dir="${build.gen-src.dir}"/>
<taskdef
name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="lib.class.path"
/>
<hbm2java output="${build.gen-src.dir}" classpathref="lib.class.path" config="D:/Applicatie/development/WEB-INF/build/classes/hibernate.cfg.xml">
<fileset dir="${build.gen-src.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>
hibernate.cfg.xmlCode:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.url">jdbc:mysql:///ngb</property>
<property name="connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.username">root</property>
<property name="connection.password" />
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<mapping resource="test/hibernate/Gebruiker.hbm.xml" />
<mapping resource="test/hibernate/Gebruikerrol.hbm.xml" />
<mapping resource="test/hibernate/Klasse.hbm.xml" />
<mapping resource="test/hibernate/Land.hbm.xml" />
<mapping resource="test/hibernate/Periode.hbm.xml" />
<mapping resource="test/hibernate/Ploeg.hbm.xml" />
<mapping resource="test/hibernate/Ploegrenner.hbm.xml" />
<mapping resource="test/hibernate/Puntentabel.hbm.xml" />
<mapping resource="test/hibernate/Renner.hbm.xml" />
<mapping resource="test/hibernate/Uitslag.hbm.xml" />
<mapping resource="test/hibernate/Wedstrijd.hbm.xml" />
<codegen>
<generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/>
</codegen>
</session-factory>
</hibernate-configuration>