Bug 111597 - Java 5 LTW broken
Summary: Java 5 LTW broken
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 1.2.1   Edit
Assignee: Helen Beeken CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-05 08:51 EDT by Matthew Webster CLA
Modified: 2005-10-13 04:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Webster CLA 2005-10-05 08:51:36 EDT
1. I would like to use aspects built with the latest AJDT 1.3.0 for LTW with 
the latest AspectJ development build but they are out of step and I get the 
exception below.
2. Instead I would like to use the new org.aspectj.weaver plugin but its JAR 
does not contain the required manifest identifying the Java 5 weaving agent
3. However even if I add the manifest myself the necessary 
org.aspectj.weaver.loadtime.Agent class is missing. In fact all the classes 
from the loadtime5 project are missing.

warning Register definition failed -- (BCException) malformed 
org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException
malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException
org.aspectj.weaver.BCException: malformed 
org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException
	at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:121)
	at org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes
(BcelAttributes.java:42)
	at org.aspectj.weaver.bcel.BcelObjectType.unpackAspectAttributes
(BcelObjectType.java:205)
	at org.aspectj.weaver.bcel.BcelObjectType.<init>
(BcelObjectType.java:107)
	at org.aspectj.weaver.bcel.BcelWorld.makeBcelObjectType
(BcelWorld.java:239)
	at org.aspectj.weaver.bcel.BcelWorld.resolveObjectType
(BcelWorld.java:234)
	at org.aspectj.weaver.World.resolveObjectType(World.java:160)
	at org.aspectj.weaver.World.resolve(World.java:132)
	at org.aspectj.weaver.bcel.BcelWeaver.addLibraryAspect
(BcelWeaver.java:144)
	at 
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerAspects
(ClassLoaderWeavingAdaptor.java:197)
	at 
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerDefinitions
(ClassLoaderWeavingAdaptor.java:131)
	at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.<init>
(ClassLoaderWeavingAdaptor.java:96)
	at org.aspectj.weaver.loadtime.Aj$WeaverContainer.getWeaver(Aj.java:78)
	at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:54)
	at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform
(ClassPreProcessorAgentAdapter.java:52)
	at sun.instrument.TransformerManager.transform
(TransformerManager.java:122)
	at sun.instrument.InstrumentationImpl.transform
(InstrumentationImpl.java:155)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.security.SecureClassLoader.defineClass
(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Comment 1 Helen Beeken CLA 2005-10-06 03:47:49 EDT
AJDT generates the contents of the org.aspectj.weaver/aspectjweaver.jar from the
aspectjtools.jar which is created as part of the aspectj build. Unfortunately,
this aspectjtools.jar doesn't contain the contents of the loadtime5 and weaver5
projects, or the manifest file. 

The solution is to unpack the contents of the aspectjweaver.jar created as part
of the aspectj build to create the org.aspectj.weaver/aspectjweaver.jar. The
reason we can't just copy this over is because the aspectj version contains some
of the runtime classes which the plugin version doesn't need (as they are in the
org.aspectj.runtime plugin).
Comment 2 Helen Beeken CLA 2005-10-06 07:47:42 EDT
The fix to the build script in the org.aspectj.ajde plugin has been checked into
both the AJDT 1.2 and AJDT 1.3 streams. I'm waiting for a good aspectj build to
regenerate the jars in the three plugins (org.aspectj.ajde, org.aspectj.runtime
and org.aspectj.weaver). 
Comment 3 Helen Beeken CLA 2005-10-13 04:01:04 EDT
This has been fixed and the resultant aspectjweaver.jar has been verified to
contain the correct classes and manifest file. 

The builds which contain this fix are:

AJDT 1.3: 20051011134207
AJDT 1.2: 20051007170626

I'm therefore closing this bug as fixed.