[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2222) SpringFramework 2.0 uses ASM.JAR versions 2.2.2. This is incompatible with Hibernate 3.2 as it uses and "unknown" previous version of ASM.JAR

Alistair Bush (JIRA) noreply at atlassian.com
Thu Apr 19 04:36:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_26758 ] 

Alistair Bush commented on HHH-2222:
------------------------------------

Hi, I encountered this issue when trying to package hibernate-3.3.2 for Gentoo Linux

I have discovered that using cglib-2.1.3 and asm-1.5.3 works correctly.

This is based on a simple example that just generates 1 record in to the database (of only 1 table).  Therefore as of yet I can not confirm whether these libraries will work in general.

I should note that Gentoo is a source based linux distro and as such packages all third party libraries separately, downloading and compiling the source that are available on upstream websites,  therefore the jars that I use may not be the exact versions used within the hibernate release.  We check API compatibility and SLOT ( mechanism for installing different version of an package separately ) when necessary.

The following is the error trace that I receive when running my example using  I am happy to provide the example code if required.  But will warn you that It is an adaption of the first stages of the hibernate tutorial ( so not advanced at all )

Initial SessionFactory creation failed.java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(ILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.javacrm.core.HibernateUtil.<clinit>(HibernateUtil.java:33)
        at org.javacrm.Main.createAndStoreTable(Main.java:45)
        at org.javacrm.Main.main(Main.java:37)
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(ILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
        at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:63)
        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:215)
        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.proxy.Enhancer.<clinit>(Enhancer.java:64)
        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>(PojoEntityTup

> SpringFramework 2.0 uses ASM.JAR versions 2.2.2.  This is incompatible with Hibernate 3.2 as it uses and "unknown" previous version of ASM.JAR
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-2222
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2222
>             Project: Hibernate3
>          Issue Type: Improvement
>    Affects Versions: 3.2.0.ga
>         Environment: Hibernate 3.2.0ga
>            Reporter: Greg McGregor
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> SpringFramework 2.0 uses ASM.JAR from ObjectWeb version 2.2.2.  However, Hibernate 3.2.0ga utilizes an "unknown" previous version of the ASM.JAR.  The issue is that the method signatures and classes have changed between the two versions.  Therefore, Hibernate 3.2.0ga won't run with the new ASM.JAR and Spring 2.0 won't run with the previous ASM.JAR.  Mushing the two JARs together in an attempt to get something going results in a NoSuchMethodError (which would make sense).
> Although this isn't a direct Hibernate3 bug, it does preclude stable use with Spring 2.0/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list