Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Upgrading Hibernate Annotations from 3.2.1.ga to 3.3.0.ga
PostPosted: Wed Aug 22, 2007 10:11 am 
Beginner
Beginner

Joined: Sun Oct 05, 2003 9:07 am
Posts: 47
I recently tried upgrading hibernate-annotations from 3.2.1.ga to 3.3.0.ga in a Maven 2 environment. This caused the following error:

Code:
Caused by:
java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/ReflectionManager


Adding the following dependency to my pom.xml fixes the problem:

Code:
  <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-commons-annotations</artifactId>
      <version>3.3.0.ga</version>
  </dependency>


Shouldn't hibernate-commons-annotations be a declared dependency in the hibernate-annotations pom.xml so transitive dependencies resolves this?

I found a similar issue when upgrading hibernate-entitymanager from 3.2.1.ga to 3.3.1.ga. The 3.3.1.ga has a dependency on jboss-common-core, but this JAR is not located in a central repository.

Code:
Missing:
----------
1) jboss:jboss-common-core:jar:2.0.4.GA


The first issue seems easy enough to fix. The 2nd requires uploading the new dependency. I can enter issues in JIRA for these if you like.

Thanks,

Matt


Top
 Profile  
 
 Post subject: Added JBoss's repo doesn't help hibernate-entitymanager
PostPosted: Wed Aug 22, 2007 10:18 am 
Beginner
Beginner

Joined: Sun Oct 05, 2003 9:07 am
Posts: 47
I added JBoss's Maven repo (http://repository.jboss.com/maven2/) to my pom.xml to try and fix the issue with not finding jboss-common-core. Now I get the following error when trying to run my tests.

Code:
java.lang.NoClassDefFoundError
Caused by: java.lang.NoClassDefFoundError
   at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:626)
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)


I'm using Spring, so maybe this is an issue with Spring not being compatible with the latest release of hibernate-entitymanager?

Thanks,

Matt


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 28, 2007 2:49 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7179
Location: Atlanta, USA
Try using the jboss-common that is bundled in the HEM distro, I know there has been some changes in this area by Bill.
FTR, I got rid of this dependency in SVN, so it won't be a problem in the next release.

Open the JIRA issue regarding maven and assign it to Aleksei Valikov (lexicore), he is the one dealing with the maven repos.

_________________
Emmanuel
Check Hibernate Search in Action out


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 12:11 am 
Beginner
Beginner

Joined: Sun Oct 05, 2003 9:07 am
Posts: 47
emmanuel wrote:
Try using the jboss-common that is bundled in the HEM distro, I know there has been some changes in this area by Bill.
FTR, I got rid of this dependency in SVN, so it won't be a problem in the next release.

Open the JIRA issue regarding maven and assign it to Aleksei Valikov (lexicore), he is the one dealing with the maven repos.


I tried excluding jboss:jboss-common-core and adding jboss-archive-browsing and it does indeed solve the problem. I don't know if the version is correct (5.0.0alpha-200607201-119), but it's the only one in Maven's central repo:

http://mvnrepository.com/artifact/jboss ... e-browsing

I'll open an issue in JIRA.

Thanks,

Matt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.