• Accueil
  • Nos clients
  • Blog
  • Contact
Select Page ...

Blog

Conflit de lib Apache CXF et hibernate

Samuel 24/06/2009 Java No Comments

Je viens de perdre pas mal de temps à faire fonctionner mon projet qui utilise hibernate et apache CXF pour exposer des WebServices.

Au moment de compiler j’avais l’erreur suivante :
WARN: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor:
at net.sf.cglib.core.KeyFactory$Generator.generateClass

Au début ça me paraissait être un simple NoClassDefFound, mais la classe recherchée était bien dans mon CLASSPATH.

A force de chercher j’ai fini par comprendre que c’etait un problème d’incompatibilité de version de lib cglib. Il faut donc exclure la librairie cglib récupérée avec hibernate pour en prendre une nommée : cglib-nodep.

Voici comment faire dans votre fichier maven 2 :


    org.hibernate
    hibernate
    3.2.1.ga
    
        
            cglib
            cglib
        
    


    cglib
    cglib-nodep
    2.1_3

Partagez cet articleShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someoneShare on Tumblr
← RMLL à Nantes
Acceleo M2T et Eclipse 3.5 →
Samuel

CEO d'Apptom Expert Technique

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


  • Date

    June 2009
    M T W T F S S
    « May   Jul »
    1234567
    891011121314
    15161718192021
    22232425262728
    2930  
  • Catégories

    • Agile
    • API
    • Arcade
    • Cloud
    • HTML
    • Humour
    • Innovation
    • iPhone
    • Java
    • Logiciel Libre
    • Modelisation
    • Non classé
    • Perso
    • Les derniers articles du blog

      • Création d’un cron avec SNS
      • Premiers tests de Google App Engine en PHP
      • Lancer un cron sur un cluster
      • New Relic sur du Beanstalk PHP
      • Amazon Web Services Consulting Partners
    • Contact

      Contactez nous
      • samuel@apptom.fr
      • 06 86 63 20 47
    Copyright © 2012 Apptom. All Rights Reserved