-->
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.  [ 2 posts ] 
Author Message
 Post subject: Reverse Engineering not generating any files
PostPosted: Tue May 10, 2011 4:58 am 
Newbie

Joined: Mon Oct 24, 2005 6:44 am
Posts: 11
Hi
I am trying perform reverse engineering on MYSQL database.
It seem to run file, but not generating any files eg class or hbm.
Here is my setup file.

build.xml
Code:
<!-- hibernate tool reverse engineering -->
<hibernatetool destdir="${sourcedir}" templatepath="${revengdir}/templates">
   <classpath>
         <path location="${classesdir}" />
         <path location="${toolclassesdir}" />
   </classpath>
   <jdbcconfiguration
      propertyfile="${revengdir}/hibernate.properties"
      packagename="net.ps.domain.hibernate"
      revengfile="${revengdir}/hibernate.reveng.xml"
            reversestrategy="net.ps.tool.hibernate.ReverseEngineeringStrategy"
      detectmanytomany="false"
      detectoptimisticlock="true"
         >
   </jdbcconfiguration>
         
   <hbm2hbmxml />
   <hbm2java />
             <hbm2cfgxml destdir="${sourcedir}" />
</hibernatetool>


Hibernate.properties
Code:
hibernate.bytecode.use_reflection_optimizer = false
hibernate.cache.provider_class = org.hibernate.cache.EhCacheProvider
hibernate.cache.use_second_level_cache = false
hibernate.default_batch_fetch_size = 16
hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
hibernate.format_sql = true
hibernate.generate_statistics = true
hibernate.show_sql = true

hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost/PS1
hibernate.connection.username = root
hibernate.connection.password = xxxx


Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
  <table-filter match-schema="PS1" match-name="land"/>
  <table-filter match-schema="PS1" match-name="prop"/>
   
   <!-- PS1 schema -->
   <table schema="PS1"  name="land">
      <primary-key>
         <generator class="native" />
      </primary-key>
   </table>
   
   <table schema="PS1" name="prop">
      <primary-key>
         <generator class="native" />
      </primary-key>
      <foreign-key constraint-name="landId">
         <set exclude="true" />
      </foreign-key>
   </table>
</hibernate-reverse-engineering>


When I run batch file, it doesn't give any error and display message,build successfully.
But I don't see any files get genrated.

Please could you help where i am going wrong.

many thanks


Top
 Profile  
 
 Post subject: Re: Reverse Engineering not generating any files
PostPosted: Tue May 10, 2011 7:05 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Try to use "match-catalog" in reveng.xml

<table-filter match-catalog="PS1" match-name="land"/>
<table-filter match-catalog="PS1" match-name="prop"/>

in reveng file. There is a problem of concepts with MySQL.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.