-->
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: Middlegen - duplicates - doesn't have any table named
PostPosted: Fri Dec 03, 2004 2:16 pm 
Newbie

Joined: Mon Nov 22, 2004 1:04 pm
Posts: 5
Location: Denver, CO
I have not had to regenerate my hbms in a while, but I made changes to my ddl scripts then regenerated the hbms. Using middlegen-2.0-vo.jar and middlegen-hibernate-plugin-2.0-vo.jar, I get duplicate entries in the hbms which translates into duplicate entries in the POJOs

I read somewhere to fix this just update to middlegen-2.1.jar and middlegen-hibernate-plugin-2.1.jar. Now When I generate the hbms I get the exception listed below that it cannot find the tables.

What am I missing?

Thanks,
Chad

Hibernate version:
2.1.6

Mapping documents:
<target name="generate.hbm" depends="init, clean.hbm, copy.hibernate.config">
<mkdir dir="${hbm.gen.dir}" />
<taskdef name="middlegen" classname="middlegen.MiddlegenTask" classpathref="project.class.path" />
<middlegen appname="vicap"
prefsdir="${hbm.gen.dir}"
databaseurl="${db.url}"
driver="${db.driver}"
username="${db.username}"
password="${db.password}"
schema="${db.schema}">

-- Many table defs --


Full stack trace of any exception that occurs:
middlegen.MiddlegenException: The database
doesn't have any table named ADDENDUM_CATEGORY. Please make sure the table exists. Also note that some databases are case sensitive.
Found the following tables:

----


Name and version of the database you are using:
Oracle 9i

The generated SQL (show_sql=true):
Does not get that far...

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 03, 2004 3:42 pm 
Newbie

Joined: Mon Nov 22, 2004 1:04 pm
Posts: 5
Location: Denver, CO
Found it...

I was reading my schema name from a properties file, and it was wrong. The older version did not care (I don't know how it found the tables at all), but generated duplicate attributes in the hbms.

Using middlegen 2.1 does not generate duplicates.

Chad


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 03, 2004 11:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Glad you found the issue. Its this sort of problem that is so hard to help with on the forum.


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.