-->
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: org.hibernate.MappingException: Could not configure override
PostPosted: Thu Mar 08, 2007 11:07 pm 
Newbie

Joined: Thu Mar 08, 2007 10:44 pm
Posts: 5
Hibernate version: 3.2

I am following the Hibernate Tools Documentation to generate .hbm.xml and java files by using the code generation launcher in Eclipse. I can successfully generate these files, using this reverse engineering configuration file (reveng.xml)

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="DOR"/>
</hibernate-reverse-engineering>


However, if I add a type-mapping element to the reveng.xml file, I get an popup dialog exception saying:

Quote:
Exception while generating code:

Reason:

org.hibernate.MappingException: Could not configure overrides from file: <path>\reveng.xml


I need to put a type-mapping (type-mapping doc I followed) element in my reveng.xml file but I cannot find any combination that allows me to do it without getting the MappingExeption. Here are the combinations I've tried to no avail:

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>
<type-mapping>
    <sql-type jdbc-type="VARCHAR" hibernate-type="string"></sql-type>
</type-mapping>
<schema-selection match-schema="DOR"/>
</hibernate-reverse-engineering>


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>
<type-mapping/>
<schema-selection match-schema="DOR"/>
</hibernate-reverse-engineering>


Is there anything wrong with my reverse engineering file?

If so, can I get an example of a reverse engineering file which contains a type-mapping?

If not, how can I debug this problem?

Are there any logs in Eclipse I can look at?

Thanks,

Marc


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 09, 2007 12:09 pm 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
The DTD states:

Code:
<!ELEMENT hibernate-reverse-engineering (
   (schema-selection)*, type-mapping?,
   (table-filter)*, table*)>

So, schema-selection must come before the type-mapping.


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.