Alberthoven
Alberthoven

Reputation: 2858

Upgrade hibernate-annotations and hibernate-validator

I'm using hibernate-annotations 3.3.1.GA (hibernate 3.2.6.ga) and hibernate-validator 3.0.0.ga, but due to validation problems I need to upgrade the libraries to hibernate-annotations 3.4.0.GA (hibernate 3.3.2.GA) and hibernate-validator 3.1.0.GA.

When I update my pom.xml file I get a lot of compilation errors. I think there are hibernate packages that have been reallocated in the new version, so I guess I must add new dependencies. But I am not able to find out which.

Examples of packages and classes not found with the new version:

  - package net.sf.cglib.proxy
  - class MethodInterceptor
  - class MethodProxy
  - class Enhancer
  - class CallbackFilter
  - class Callback

Should I add hibernate-search and/or hibernate-entitymanager dependencies? Anyone has the same problem? Any idea?

Thanks in advance!

Upvotes: 2

Views: 2039

Answers (3)

Yuri.Bulkin
Yuri.Bulkin

Reputation: 1414

I suppose, all you need is: cglib-nodeps-2.2.jar

Upvotes: 0

Alberthoven
Alberthoven

Reputation: 2858

Finally I had to add some dependencies and exclude others:

<dependency>
   <groupId>cglib</groupId>
   <artifactId>cglib</artifactId>
   <version>2.2</version>
</dependency>
<dependency>
   <groupId>javassist</groupId>
   <artifactId>javassist</artifactId>
   <version>3.8.0.GA</version>
   <optional>true</optional>
</dependency>
<dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-log4j12</artifactId>
   <version>1.5.6</version>
</dependency>

Upvotes: 1

Arthur Ronald
Arthur Ronald

Reputation: 33783

I use this one and works fine

<dependencies>
    <dependency>
        <groupId>ezmorph</groupId>
        <artifactId>ezmorph</artifactId>
        <version>1.0.6</version>
    </dependency>
    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>2.1_3</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>3.0.0.ga</version>
        <exclusions>
            <exclusion>
                <groupId>org.hibernate</groupId>
                <artefactId>hibernate-core</artefactId>
            </exclusion>
            <exclusion>
                <groupId>org.hibernate</groupId>
                <artefactId>hibernate-annotation</artefactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>1.4</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibenate-annotations</artifactId>
        <version>3.4.0.GA</version>
    </dependency>
</dependencies>

regards,

Upvotes: 1

Related Questions