-->
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.  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: unmapped class Exception with Tools alpha
PostPosted: Tue Feb 15, 2005 5:13 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
I just switched to hibernate 3 and thus tried to use Hibernate-tools 3 alpha hbm2java to generate my classes.

It always complains that associations reference unmapped classes, it never did that before. The unmapped class is also to be generated and was not yet generated. So I think that this is an order problem.

The 2.1 Extentions never had problems with that, do I have to take care of the order now?

I am using the hbm2java from ant!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 4:57 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the "old" hbm2java is not supported at the moment for H3 - it will be back again soon in the toolset.

until then use the artifact generator from eclipse (just dont tell it to reverse engineer and it should work as a good old hbm2java)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: unmapped class Exception with Tools alpha
PostPosted: Wed Feb 16, 2005 5:01 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
Well, thanks I already found that one out. I don't use eclipse but I found that hbm2java 2.1 still works with the exception of UserTypes. But typedefs and meta tags work around that.

Any Idea when the new hbm2java will be available? At the same time as H3 final or later?

mike


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 5:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it will definitly be there when we go final.

please remember that hbm2java in h2.1 does not understand typedefs.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 5:31 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
yes, but it ignores them. and when the typedef name equals the real classname everything works fine ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 5:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you hack! ,)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 10:10 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 7:59 pm
Posts: 21
I'm using the Hibernate 3 tools eclipse plugin and I get the same error while trying to generate artifacts. If I tell it not to reverse engineer from JDBC connection the error goes away but nothing is generated.

Am I missing something? What would help track this issue down?

I'm running the latest Hibernate tools 3.0 alpha 1, and Eclipse 3.1M5.

Thanks,
Jim


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 11:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what error ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 1:34 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 7:59 pm
Posts: 21
org.hibernate.MappingException:Association references unmapped class ...

Eclipse should be generating all the mappings and all the classes internally based on the JDBC meta data right?

-Jim


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 4:53 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 7:59 pm
Posts: 21
SchemaExport runs without error but doesn't produce anything.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 03, 2005 9:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes it should work.

provide the schema you are trying to rev.eng for a start ....

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 4:55 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 7:59 pm
Posts: 21
I'm unable to provide the schema. I don't exactly know what is failing, there are a number of tables, some very wide; the DDL for all of them would be huge (not forum friendly). Lastly the data structures are proprietary and my company wouldn't feel comfortable dumping them in a public forum.

I realize this doesn't really help you help me. Is there a log file I could look to that may narrow down the cause of the problem without exposing so much of my data layer?

-Jim


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 05, 2005 12:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm...you could mail it to my mail if that would be ok. dont promise i can fix the bug, but would love to find out about this error.

-max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 06, 2005 1:52 am 
Beginner
Beginner

Joined: Mon Jun 21, 2004 7:59 pm
Posts: 21
I'll see what I can do next week. My DBAs are overworked on another project and if I could get Hibernate to generate the schema I would have already. :) I'm going to give the middlegen plugin a shot. Crossing fingers.


Top
 Profile  
 
 Post subject: DDL Problem
PostPosted: Mon Mar 07, 2005 10:11 am 
Regular
Regular

Joined: Fri Feb 13, 2004 10:02 pm
Posts: 90
I all, I'm am running into the same problem on DB2. I wanted let you know that the issue appears to be on the Database side. With my current userId I do not get all of the tables back from the ddl in the JDBC driver. I was using DB2's generate ddl to post my schema's ddl, and in doing so I noticed that the tables are not returned correctly. I will update this topic when I have found a solution.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 26 posts ]  Go to page 1, 2  Next

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.