openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-2171) asm should be optional
Date Thu, 10 Oct 2013 15:27:42 GMT


Mark Struberg commented on OPENJPA-2171:

Rick, I fear there are not many options.
ASM is broken in regards to classloading and we had to fix this with overriding a very method.
And this can only be done via reflection if you create a subclass on the fly (using byte code
This would be a chicken-egg problem and imo not worth the hassle.

Please note that we do not make things worse: previously there has been a hardcoded dependency
to ASM native where we do not know anything about the version, etc. It would be even possible
that some projects would not use maven and then you have 2 different ASM libs on the classpath
which will get you in deep troubles.

By using our own well known shaded version from our very own xbean project (xbean is an Apache
Geronimo sub project), we have at least a guarantee that we do not get into those problems.
At the same time we avoid classpath clashes with other ASM versions by strictly using an own
shaded package name (org.apache.xbean.asm4).

The dynamic stuff was worth a try, but it turned out that a few bugs in ASM prevent us from
doing so. 

> asm should be optional
> ----------------------
>                 Key: OPENJPA-2171
>                 URL:
>             Project: OpenJPA
>          Issue Type: Improvement
>            Reporter: Romain Manni-Bucau
>            Assignee: Mark Struberg
>              Labels: 2.3.0-candidate
>             Fix For: 2.3.0
>         Attachments: ASM.patch, kernel.patch
> openjpa uses since some versions asm but in tomee for instance we use a shade (through
the xbean one org.apache.xbean:xbean-asm-shaded to avoid classloading/version issues with
> it can be nice if openjpa can provide us an issue to this because we really don't want
to provide asm in our binaries.
> solutions can be to use the xbean shade, give us an interface to implement or to try
several implementation (xbean shade, asm,...) by reflection

This message was sent by Atlassian JIRA

View raw message