我的cfg.xml:
<session-factory>
        <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
        <property name="hibernate.connection.password">123</property>
        <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:RESDL</property>
        <property name="hibernate.connection.username">test</property>
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property> <!-- show sql -->
<property name="show_sql">true</property>
<property name="format_sql">true</property>

<!-- mapping class -->
<mapping resource="**/**/TestNoIdentifier.hbm.xml"/>
    </session-factory>我的ant xml:
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="project.classpath" />
<target name="schemaexport" depends="compile, copymetafiles" description="Exports a generated schema to DB and file">
<hibernatetool destdir="${basedir}">
<classpath path="${build.dir}" />
<configuration configurationfile="${build.dir}/hibernate.cfg.xml" />
<hbm2ddl drop="true" create="true" export="true" outputfilename="entmis-ddl.sql" delimiter=";" format="true" />
</hibernatetool>
</target>
这样写是成功生成了数据库的