facebook

asm.jar version issue with Spring & Hibernate librairies

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #269279 Reply

    factset
    Participant

    Hello,

    I’m not sure this the correct place to post that message in the forum…

    When tomcat starts I get the following error :

    java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
    at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
    at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
    at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
    at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
    at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
    at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
    at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
    at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
    at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
    at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
    at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
    at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
    at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
    at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
    at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
    at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
    at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:804)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:744)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)
    ……

    I’ve looked at that this morning and I’ve discovererd that this is probably be due to a version issue : 2 different version of the same jar are in the classpath, which is bad.
    The jar is Spring 2.0 AOP Librairies/asm-2.2.2.jar (implementation-version : 2.2.2) and Hibernate 3.2 Core Librairies/asm.jar (implementation-version : 1.5.3)

    I know how to fix that : remove all libraries from the classpath, put only the jars I need, and only the latest versions.
    But is there a way to workaround that problem using MyEclipse librairies ? Or am I “forced” not to use them, because of Spring & Hibernate differences ?

    Thanks
    Philippe

    #269313 Reply

    Riyad Kalla
    Member

    Philippe,
    The libraries are just provided for convenience, you can remove them an add your own libraries if that’s easier.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: asm.jar version issue with Spring & Hibernate librairies

You must be logged in to post in the forum log in