Hi friends,
In eclipse for a new java project i am trying to run hibernate reverse engineering in the hibernate code generation configuration by using postgresql but after the execution it wont creating the hibernate mapping xml file, also showing the table only and not showing the columns.
Also i builded build.xml using ant but it is giving error and warning so please tell what wrong in the below code
error: [hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering) [hibernatetool] 1. task: hbm2hbmxml (Generates a set of hbm.xml files) [hibernatetool] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). [hibernatetool] log4j:WARN Please initialize the log4j system properly.
BUILD FAILED /media/ETL/Data/workspace/tisfc001/build.xml:16: java.lang.NoClassDefFoundError: org/hibernate/DuplicateMappingException
Code: (for this the above error was executing)
<project name="tisfc001" basedir="." default="gen_hibernate">
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask">
<classpath> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </classpath> </taskdef>
<target name="gen_hibernate" description="generate hibernate classes"> <hibernatetool>
<jdbcconfiguration configurationfile="src/hibernate.cfg.xml" packagename="com.pgsql.db" /> <hbm2hbmxml destdir="src" /> <hbm2java destdir="src" /> </hibernatetool>
</target>
</project>
Regards, mathew
|