Updating hibernate annotations and hibernate validator

I am using hibernate annotations 3.3.1.GA (hibernate 3.2.6.ga) and hibernate-validator 3.0.0.ga, but due to validation issues, I need to update 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 hibernating packages that have been redistributed in the new version, so I guess I have to add new dependencies. But I cannot find out what.

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-lookup and / or hibernate-entitymanager dependencies? Does anyone have the same problem? Any idea?

Thanks in advance!

+2


source to share


3 answers


I use this one and it works great

<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>

      



Respectfully,

+1


source


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>

      

+1


source


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

0


source







All Articles