-->
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: Error in EntityPersister class during buildSessionFactory()
PostPosted: Thu Dec 04, 2003 3:56 am 
Beginner
Beginner

Joined: Thu Dec 04, 2003 3:47 am
Posts: 31
Location: Hong Kong
I'm a beginner in Hibernate. I have a data model in my database (Oracle). I use Middlegen plug-in for Hibernate to generate the hbm xml mapping file from tables in the database. Then I use hbm2java to generate java classes from the mapping file.

When I invoke buildsessionFactory to build the session factory object after configuration (by the configure.cfg.xml file), it successfuly binds the classes and the mapping. However, there is an java.lang.ArrayIndexOutOfBoundsException at

net.sf.hibernate.persister.EntityPersister.initPropertyPaths(EntityPersister.java:918)

When I took a look to the src code of EntityPersister, I cannot figure what the cause of the problem. I'm not sure whether it is the problem caused by the datamodel, the mapping file, or the generated class? Do any one have simliar experiences? or could point to me the direction on how to solve/figure out what the problem is? Thank a lot!

Eric Ng


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2003 6:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
PLease use Hibernate 2.1: we do some better error checking now, and the exception is more meaningful.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2003 6:42 am 
Beginner
Beginner

Joined: Thu Dec 04, 2003 3:47 am
Posts: 31
Location: Hong Kong
Thx for your suggestion. Actually I also figure out the causes of the exception.

I found that when using Middlegen to generate the xml mapping file from the database, the datatype is sometimes not accurate. I have to do manual modification from the GUI of middlegen. After such modification, I received no exception. I suspect there are some data type cannot be handled properly (like java.lang.Object)


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.