-->
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.  [ 3 posts ] 
Author Message
 Post subject: Problem with reverse engineering
PostPosted: Mon Aug 04, 2008 6:47 am 
Newbie

Joined: Fri Jul 11, 2008 6:21 am
Posts: 3
Location: Sri Lanka
Hi all

Im very new to hibernate. And im just exploring some of the features of it.
I want to generate the bean files via the hibernate tools reverse engineering feature using Ant. But it doesn't seem to work. Its not giving me an error neither is it generating the files i require. Any help would be appreciated.

Hibernate version 3 :
Hibernate tools version 3.2.2 Beta:

Database oracle 10g/9i


Heres the build.xml file
Code:
<project name="MyProject" basedir=".">

<path id="toolslib">
<path location="lib/hibernate-tools.jar"/>
<path location="lib/hibernate3.jar"/>
<path location="lib/freemarker.jar"/>
<path location="lib/classes12.jar"/>
</path>

<taskdef name="hibernatetool"
          classname="org.hibernate.tool.ant.HibernateToolTask"
          classpathref="toolslib"/>
         
<target name="reveng.hbmxml"
         description="Produces XML mapping files in src directory">
         
  <hibernatetool destdir="${basedir}/src">
 
   <jdbcconfiguration propertyfile="${basedir}/helloworld.db.properties"
                      revengfile="${basedir}/hibernate.reveng.xml"/>
   <hbm2hbmxml/>
   <hbm2cfgxml/>
   
  </hibernatetool>
 
</target>

</project>


and heres the hibernate.reveng.xml file (As you can see all i need is the tables of one schema)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering
  SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
<schema-selection match-schema="ABS_INP"/>
</hibernate-reverse-engineering>


And this the property file.

Code:
hibernate.dialect = org.hibernate.dialect.OracleDialect
hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@XXX.XXX.XX.XXX:XXXX:XXX
hibernate.connection.username = XXX
hibernate.connection.password = XXX


when i run ant in the root directory this is the output i get
------------------------
Buildfile: build.xml

BUILD SUCCESSFUL
Total time: 0 seconds
-------------------------

Additonally heres the folder structure

ROOT_DIR
-hibernate.reveng.xml
-helloworld.db.properties
-build.xm

-LIB
--classes12.jar
--freemarker.jar
--hibernate3.jar
--hibernate-tools.jar

-SRC

Thanx in advance


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 05, 2008 4:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
1) is your shcema name ABS_INP and do you have permissions to read the schema metadata?

2) try and add/edit a log4j.properties and enable debug and you should get some info on what the tool is actually reading.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 05, 2008 5:38 am 
Newbie

Joined: Fri Jul 11, 2008 6:21 am
Posts: 3
Location: Sri Lanka
Hi max tx for the reply

I found out the problem. It was with the ant build file. If any one is interested in the answer let me know and ill post it.


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

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.