You are using an old AspectJ to process aspects built by a later AspectJ. In your case the spring library is built with AspectJ 1.6 (or later) producing files tagged with weaver version 6, but the AspectJ you are using to weave them is AspectJ ~1.5 (weaver version 3).
As the language evolves the later compilers include extra information in the class files, but the earlier AspectJs do not understand this extra information - and rather than crash, you get that version information error. Same reason you cannot run a class file compiled with javac from JDK6 on a Java5 VM. cheers Andy On 30 December 2013 04:13, Krishna Jasty <krishna.ja...@tcs.com> wrote: > Hi, > > The following error is occurring when trying to include the custom aspect. > The environment is having several spring jars such as > org.springframework.aop-3.0.5.RELEASE.jar > > Any solutions for solving this. > > warning Cannot configure weaver with option > '-Xset:fastWeaving=true,weaveJavaPackages=false,weaveJavaxPackages=false': > unknown option > warning Cannot configure weaver with option > '-Xset:fastWeaving=true,weaveJavaPackages=false,weaveJavaxPackages=false': > unknown option > warning Cannot configure weaver with option > '-Xset:weaveJavaxPackages=true': unknown option > warning register definition failed -- (BCException) Unable to continue, > this version of AspectJ supports classes built with weaver version 3.0 but > the class DiagnosticAspects.HeapAspect is version 6.0 > > Unable to continue, this version of AspectJ supports classes built with > weaver version 3.0 but the class DiagnosticAspects.HeapAspect is version 6.0 > > org.aspectj.weaver.BCException: Unable to continue, this version of > AspectJ supports classes built with weaver version 3.0 but the class > DiagnosticAspects.HeapAspect is version 6.0 > > at > org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelAttributes.java:53) > at > org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:303) > at org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.java:144) > at org.aspectj.weaver.bcel.BcelWorld.buildBcelDelegate(BcelWorld.java:337) > at org.aspectj.weaver.bcel.BcelWorld.resolveDelegate(BcelWorld.java:320) > at org.aspectj.weaver.ltw.LTWWorld.resolveDelegate(LTWWorld.java:90) > at org.aspectj.weaver.World.resolveToReferenceType(World.java:349) > at org.aspectj.weaver.World.resolve(World.java:265) > at org.aspectj.weaver.bcel.BcelWeaver.addLibraryAspect(BcelWeaver.java:155) > at > org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerAspects(ClassLoaderWeavingAdaptor.java:336) > at > org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerDefinitions(ClassLoaderWeavingAdaptor.java:189) > at > org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:125) > at > org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavingAdaptor.initialize(Aj.java:130) > at > org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavingAdaptor.getWeavingAdaptor(Aj.java:135) > at org.aspectj.weaver.loadtime.Aj$WeaverContainer.getWeaver(Aj.java:101) > at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:61) > at > org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:55) > at sun.instrument.TransformerManager.transform(TransformerManager.java:181) > at > sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:377) > at java.lang.ClassLoader.defineClassImpl(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:265) > at java.security.SecureClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:493) > at java.net.URLClassLoader.access$300(URLClassLoader.java:64) > at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:892) > at java.security.AccessController.doPrivileged(AccessController.java:284) > at java.net.URLClassLoader.findClass(URLClassLoader.java:414) > at java.lang.ClassLoader.loadClass(ClassLoader.java:643) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:300) > at java.lang.ClassLoader.loadClass(ClassLoader.java:609) > > > > Thanks, > Krishna > > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > >
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users