Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Load Time Weaver Java 1.4 AJ.BAT

Hi Dennis,

For a long time AspectJ was keeping the compatibility requirements as low as possible. The times it has been increased have typically been when the JDT compiler (upon which we are based) has increased its own requirements - and that doesn’t happen very often.

The Readme for 1.6.6 ( https://eclipse.org/aspectj/doc/released/README-166.html ) mentioned that Java5 was now required to run the compiler/weaver. This doesn’t mean it couldn’t weave into older code but of course that is only true for compile time weaving or binary weaving (run AspectJ on Java5 but weave into Java1.4 or 1.3 code). With load-time weaving you are running the weaver on the same level of Java as the code being loaded - so if they are using a 1.4 VM to run their 1.4 code, it’ll be a problem.

So 1.6.5 is the most recent you can probably get away with. Maybe I can help you with the “can’t determine superclass of missing type” exceptions? Recall that weaving can need to do as much analysis to determine pointcut matches as a compiler would (in terms of resolving types) so you may need to put as many jars on the class path to weave something as were then when it was compiled. For some messages, if you are confident they are irrelevant you can turn them off (e.g. you *know* you don’t need to resolve the information related to the type it can’t find). The AbortExceptions are more worrying.

There is a tool called retroweaver that allows the use of later JVM constructs on older VMs - possibly the aspectjweaver jar could be run through retroweaver but I’m not sure how it’ll behave. It is possible, given that Java5 requirement, that AspectJ will attempt to load classes like Annotation and fail horribly if they aren’t there (because they’d always be there on Java5 or higher).

cheers,
Andy

On May 8, 2015, at 8:36 AM, Dennis Taylor <dwt@xxxxxxxxxxxxxxx> wrote:

We're incorporating some very simple aspects into some of the things we
do and have kind of a major problem.  We're good with Java 1.5 and later
but can't get load time weaving working on Java 1.4 with versions of
aspectj 1.6.9 and later. Versions 1.6.3 and earlier seem to have issues
with the java 1.4 code that we're trying to weave into.

Unfortunately, we can't dictate what jvm versions our customers run on
and some very large installations need to run 1.4.  We are a very small
part of large java applications that they own/maintain.  All of their
application code is java 1.4 compatible and that is what we are weaving
into.  When we try to use AspectJ 1.6.3 and earlier, there are aspectj
related issues that we don't see with the latest version of the AspectJ
weaver (org.aspectj.bridge.AbortException's and "can't determine
superclass of missing type" exceptions).

I'm hoping for some kind of guidance.  I can't find anything anywhere
about the LTW requiring a newer level of java.  The 1.4 JVM compatible
AJ.BAT still ships with even the latest versions and all the
documentation that refers to AJ.BAT still seems to be in place, yet
AJ.BAT doesn't work if the JVM is java 1.4.  Am I missing something?

Thanks.

--
Dennis
919 719 8428 (w)

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top