[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

Andy Bailey (JIRA) noreply at atlassian.com
Thu Sep 20 16:37:16 EDT 2007


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

Andy Bailey commented on HHH-2222:
----------------------------------

I just noticed that the asm faq has the solution to this problem http://asm.objectweb.org/doc/faq.html

15 How to resolve conflicts between different ASM API versions available in a global classpath or within the same ClassLoader?

Tools and frameworks that are using ASM for bytecode processing (e.g. Hibernate, CGLIB, AspectWerkz) should repackage ASM code within their own name space. This can be automated with Jar Jar Links tool. http://tonicsystems.com/products/jarjar/
-----------------
Jar Jar Links is a utility that makes it easy to repackage Java libraries and embed them into your own distribution. This is useful for two reasons:

    * You can easily ship a single jar file with no external dependencies.
    * You can avoid problems where your library depends on a specific version of a library, which may conflict with the dependencies of another library.

...
Jar Jar Links includes an Ant task (com.tonicsystems.jarjar.JarJarTask) that extends the built-in Jar task. The normal zipfileset element is used to embed jar files. A new rule element is added which uses wildcards patterns to rename the embedded class files. Bytecode transformation (via ASM) is used to change references to the renamed classes, and special handling is provided for moving resource files and transforming string literals.

Jar Jar Friendly Libraries: include ASM


... so it doesnt seem like any source code changes are needed ! 

Would it be possible to implement this in the hibernate build process so that it doesnt conflict with other versions of asm that the user may need (its not just a hibernate-spring problem)


> 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
>         Attachments: HHH-2222.patch
>
>   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