The Hibernate <mapping package="..."> configuration element doesn't expect a package with annotated classes as one might assume but expects an annotated package with package-level annotations like @GenericGenerator. So you must explicitly add every annotated class to your Hibernate configuration with a <mapping class="..."> element (or do it programmatically). You might also want to have a look at the Hibernate Entitymanager which apart from being a JPA implementation and thus making your OR mapper exchangeable also gives you the convenience of searching for annotated classes by itself.

Cheers,

Uli

Lindsay Steele schrieb:
Just by co-incidence, I am trying to get Hibernate working but I am getting the following error in the logs.

08:10:04.531 WARN!! [SocketListener0-1] org.hibernate.cfg.AnnotationBinder.bindPackage(AnnotationBinder.java:217) >90> Package not found or wo package-info.java: ozpoultry.breeders.entities

The package definitely exists. It is a base package at the level of pages, components etc etc. There is also an entity class in the package.
Is there something I am missing ?

Davor Hrg wrote:
not much at the moment,
but it's simple to use,
factories are created
http://tapestry.apache.org/tapestry5/tapestry-hibernate/conf.html

you just call
@Inject private Session _session;

or in the method
Especialy if you have DAO's that have Session in constructor
than you can configure them efortlessly via AppModule.bind

I havent got much time to write you more ...
but try it out a bit, it works like a charm


Davor Hrg

On 9/9/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
Hi,

I searched the list to find a simple tutorial for Tapestry-hibernate, but
couldn't find any, some quite simple, but source code not complete. any
simple code there? anyway, I believe Hibernate can be used directly
without
Tapestry-hibernate module, my question now is, what are the advantages
using
Tapestry-hibernate over using the Hibernate directly? Thanks for sharing,
A.C.
--
View this message in context:
http://www.nabble.com/T5%3A-Hibernate-tf4409684.html#a12579774
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to