-->
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: "could not instantiate id generator" Exception
PostPosted: Mon Nov 24, 2003 12:24 am 
Newbie

Joined: Sun Aug 31, 2003 7:58 pm
Posts: 3
Recently upgraded from Hibernate 1.x to 2.1 and am getting this Exception msg: could not instantiate id generator

I am deploying to JBoss 3.0.2 using xdoclet to do the hibernate stuff.

My startup servlet does this when the error occurs:
Code:
InputStream in = getClass().getClassLoader().getResourceAsStream("hibernate.properties");
Properties  props = new Properties();
props.load(in);

Configuration cfg = new Configuration()
.addClass(Account.class)
.addClass(Customer.class);

SessionFactory sessionFactory = cfg.setProperties(props).buildSessionFactory();

This last line is where the exception is, i've traced the error to the IdentifierGeneratorFactory hibernate class but can't see what I've missed.

Anyone have a clue as to what I might have missed?

Thanks...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 24, 2003 1:10 am 
Newbie

Joined: Sun Aug 31, 2003 7:58 pm
Posts: 3
Solved my own problem.

In xdoclet I still had
* @hibernate.id
* generator-class="vm.long"

Which is now:
* @hibernate.id
* generator-class="increment"


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.