Hi, I use Hibernate Tool 3.2.0beta9a with Ant Task to generate mapping file from the Database schema. Ant task ran succesfully but no files was generated. Could anyboby please help me?
buildfile:
Code:
<project name="ReverseDB" default="jar" basedir=".">
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask">
<classpath>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
<target name="jar" description="Build the distribution .jar file">
<property name="PojoFolder" value="C:\Documents and Settings\Admin\rssreader\src\src\com\vht\pojo" />
<hibernatetool destdir="${PojoFolder}">
<configuration configurationfile="C:\Documents and Settings\Admin\rssreader\src\hibernate.cfg.xml"/>
<hbm2java destdir="${PojoFolder}"/>
</hibernatetool>
</target>
</project>
Config file:
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/joomla</property>
<property name="connection.username">root</property>
<property name="connection.password">genius</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MysqlDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>
And the Build file result:
Code:
Buildfile: C:\Documents and Settings\Admin\rssreader\src\reverse.engineer.xml
jar:
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
[hibernatetool] Jul 12, 2007 2:48:14 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: Hibernate 3.2.4.sp1
[hibernatetool] Jul 12, 2007 2:48:14 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: hibernate.properties not found
[hibernatetool] Jul 12, 2007 2:48:14 PM org.hibernate.cfg.Environment buildBytecodeProvider
[hibernatetool] INFO: Bytecode provider name : cglib
[hibernatetool] Jul 12, 2007 2:48:14 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernatetool] Jul 12, 2007 2:48:15 PM org.hibernate.cfg.Configuration configure
[hibernatetool] INFO: configuring from file: hibernate.cfg.xml
[hibernatetool] Jul 12, 2007 2:48:15 PM org.hibernate.cfg.Configuration doConfigure
[hibernatetool] INFO: Configured SessionFactory: null
[hibernatetool] Jul 12, 2007 2:48:15 PM org.hibernate.tool.Version <clinit>
[hibernatetool] INFO: Hibernate Tools 3.2.0.b9
BUILD SUCCESSFUL
Total time: 2 seconds