-->
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.  [ 6 posts ] 
Author Message
 Post subject: Annotations and entity manager NOT in core in 3.5.x?
PostPosted: Sun Jan 24, 2010 3:20 pm 
Beginner
Beginner

Joined: Thu Dec 29, 2005 12:08 pm
Posts: 31
Location: Acton, MA
https://www.hibernate.org/6.html says:
Quote:
As of Hibernate 3.5 Annotations and EntityManager have been merged back into the Core.

But when I make my project depend on hibernate-core 3.5.0-Beta-3 only, org.hibernate.ejb.HibernatePersistence.class is not present in the jar file.

Is this due to the fact that 3.5 is still in beta?

Best,
Laird


Top
 Profile  
 
 Post subject: Re: Annotations and entity manager NOT in core in 3.5.x?
PostPosted: Sun Jan 24, 2010 11:27 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Is it a org.hibernate or a javax.persistence class now?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject: Re: Annotations and entity manager NOT in core in 3.5.x?
PostPosted: Sun Jan 24, 2010 11:56 pm 
Beginner
Beginner

Joined: Thu Dec 29, 2005 12:08 pm
Posts: 31
Location: Acton, MA
Well, if I include hibernate-entitymanager then everything works without changing the class name.


Top
 Profile  
 
 Post subject: Re: Annotations and entity manager NOT in core in 3.5.x?
PostPosted: Mon Jan 25, 2010 9:01 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
>>Well, if I include hibernate-entitymanager then everything works without changing the class name.

Don't do it! Don't use any older hibernate-entitymanager.jar !


hibernate3.jar version 3.5.0-beta3 contains HibernatePersistence.class definitely !

jar -tvf hibernate3.jar | grep HibernatePersistence.class
3746 Thu Jan 14 03:45:50 CET 2010 org/hibernate/ejb/HibernatePersistence.class


Guenther


Top
 Profile  
 
 Post subject: Re: Annotations and entity manager NOT in core in 3.5.x?
PostPosted: Mon Jan 25, 2010 9:14 am 
Beginner
Beginner

Joined: Thu Dec 29, 2005 12:08 pm
Posts: 31
Location: Acton, MA
Now I'm really confused.

Hibernate's jars can be found by looking under http://repository.jboss.com/maven2/org/hibernate/ (when using maven).

hibernate-core is one of the directories here. So is hibernate-entitymanager.

For version 3.5, the documentation says not to include both, because everything has been rolled into hibernate-core.

But as far as I can tell, this is not the case. Have a look at http://repository.jboss.com/maven2/org/ ... Beta-3.jar. Crack it open. Look inside. It does not appear to be the case that annotations or EntityManager-related classes are in here.

Then have a look at http://repository.jboss.com/maven2/org/ ... Beta-3.jar. That has the EntityManager-related classes in it.

Finally, there is no hibernate3.jar or maven artifact.

I know that everything works if I make my project depend on hibernate-core, hibernate-entitymanager and hibernate-annotations, all with version 3.5.0-Beta-3. This, however, goes against the documentation. I am trying to figure out whether the documentation is wrong or whether someone never checked to see what was going in what jar, or if I'm using the wrong Maven repository, or...?

Best,
Laird


Top
 Profile  
 
 Post subject: Re: Annotations and entity manager NOT in core in 3.5.x?
PostPosted: Mon Jan 25, 2010 9:23 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hi,

ok now I understood.
Usually users download a hibernate distribution (and there's a file named hiberante3.jar ),
as you can find under https://sourceforge.net/projects/hibernate/files/hibernate3/3.5.0-Beta-3/
An there's the tings are already merged.
Apparently in the maven directory the stuff is still divided...


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