-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate and Postgresql
PostPosted: Fri Dec 07, 2012 2:26 am 
Newbie

Joined: Fri Dec 07, 2012 2:01 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.