-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Entity Manager NOT detecting classes with @Entity
PostPosted: Tue Jun 13, 2006 4:58 pm 
Newbie

Joined: Thu May 04, 2006 3:53 pm
Posts: 11
Hi,

Versions :
-----------
Hibernate Core 3.2.CR2
Hibernate Annotations 3.2.0 CR1
Hibernate Entity Manager 3.2.0 CR1


Problem
----------
When using the EntityManagerFactory from a webapplication (jetty), all my @Entity classes are detected, and mapped correctly.

When running the same code from Eclipse (run java application), hibernate doesn't detect any of my @Entity. Everything works perfectly if I add all the corresponding <class> entries in persistence.xml, but if not strictly necessary, I'd prefer to avoid that, because it is a pain to maintain.

Is it a bug or a feature ?

Thanks for your help
Sami Dalouche


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 15, 2006 11:47 am 
Newbie

Joined: Fri Apr 07, 2006 3:50 am
Posts: 3
You need to set the exclude-unlisted-classes tag to false in your persistence.xml.

Quote:
<persistence-unit ...>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
</persistence-unit ...>


By default is true on JSE, and false in JEE..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 16, 2006 3:07 pm 
Newbie

Joined: Thu May 04, 2006 3:53 pm
Posts: 11
ruben_inoto wrote:
You need to set the exclude-unlisted-classes tag to false in your persistence.xml.

Quote:
<persistence-unit ...>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
</persistence-unit ...>


By default is true on JSE, and false in JEE..


Does not seem to solve anything...
Any other idea ?


Top
 Profile  
 
 Post subject: Same here
PostPosted: Mon Jun 19, 2006 4:25 pm 
Newbie

Joined: Wed Nov 26, 2003 3:03 pm
Posts: 9
Location: Denver, CO
Same thing here. If I explicitly map classes, it will figure everything out OK. Otherwise even setting the exclude-unlisted-classes to false doesn't do anything.

Derek


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.