-->
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: Hibernate Annotations Newbie Issue
PostPosted: Fri Jul 24, 2009 3:07 pm 
Newbie

Joined: Fri Jul 24, 2009 2:56 pm
Posts: 1
Years ago I set up Hibernate Annotations on a system (back when annotations was in beta) and am now doing so again, but got caught up in an issue that I am not sure how to work around.

I am trying to set up a programmatic configuration. For several reasons, I would like to get a purely programmatic solution working if that is possible.

I set up my AnnotationConfiguration with the following properties set:
hibernate.connection.driver_class (HSQLDB's jdbcDriver)
hibernate.connection.url (in-memory HSQLDB)
hibernate.connection.username (sa)
hibernate.connection.password ("")
hibernate.show_sql (true)
hibernate.connection.pool_size (1)
hibernate.current_session_context_class (thread)
hibernate.dialect (HSQLDialect)

This is not meant for production yet, but is rather a proof-of-concept in integrating this into an existent large project.

I have also added one annotated class which uses method annotations.

When I run the configure step I get the message "/hibernate.cfg.xml not found," is there some required property that I'm missing, can I need to give it an XML file in the config that is not hibernate.cfg.xml, or is there no way out of having hibernate.cfg.xml?


Top
 Profile  
 
 Post subject: Re: Hibernate Annotations Newbie Issue
PostPosted: Fri Jul 24, 2009 6:42 pm 
Regular
Regular

Joined: Thu Apr 14, 2005 10:39 am
Posts: 115
Hi, just don't call "configure", it is not needed, if "addProperties" is used.

Had the same problem before and spent a lot of time, cause it is not obvious.

viewtopic.php?f=9&t=986222

Greetings Michael


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.