Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] "not reweavable" errors on annotations and enums in 1.6.7 LTW

Hi Andy,
I spent some hours trying to trace this issue to create a test case. What I've understood up to now is that the problem resides in using a specific classloader for LTW, and using WeavingAdaptor instead of ClassLoaderWeavingAdaptor .

Since this issue is quite specific to a special case (when you want to control LTW in a specific classloader), and since there is a workaround, I don't think it is a blocker for 1.6.7(a).

However, just to see if it could be cause of other problems elsewhere, in 1.6.6 I could use LTW on a specific classloader with :

public MyAdaptor implements ClassLoader, WeavingClassLoader {
   WeavingAdaptor adaptor;
   .....
   this.adaptor = new WeavingAdaptor(this);

Then delegate to the adaptor the weaving phase, and receive from it generated closure classes.

With 1.6.7(a), using WeavingAdaptor directly in this way :
- I have the AbortException on those types
- aop.xml is ignored

So, it seems like some stuff is not initialized properly (for example, definitions from aop.xml are never loaded).

If instead I use ClassLoaderWeavingAdaptor, it works correctly, but I loose control on generated closures, because ClassLoaderWeavingAdaptor does not use the WeavingClassLoader callback for generated classes but defines them directly instead. I managed to get back control on them subclassing ClassLoaderWeavingAdaptor, but it's quite a hack.

Maybe it's time to write a wiki page or update javadocs or something about how to use WeavingAdaptor/WeavingClassLoader/ClassLoaderWeavingAdaptor . I need custom control on the LTW process to chain it with other transformations, like JPA/coverage etc...

If you give me a couple of hints, I'll try to write a wiki page.

Simone

Andy Clement wrote:
a testcase would be great.

Andy

2010/1/5 Simone Gianni <simoneg@xxxxxxxxxx>:
Hi all,
I'm getting several AbortExceptions during 1.6.7 LTW about enums and
annotations being "already woven and has not been built in reweavable mode".

This was not happening in 1.6.6. I suppose this is a consequence of speeding
up the process, cause annotations cannot be weaved at all, and enumerations
have a number of limitations. In Magma we do ignore these AbortExceptions,
and since we don't weave anything on enums we can safely do so returning the
original type, but it still seem like something is wrong.

I'll fill an entry on bigzilla (and try to setup a small test case) unless
someone points out that I'm clearly missing something.

Simone

--
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
http://www.simonegianni.it/

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


--
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
http://www.simonegianni.it/



Back to the top