Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] badWeaverState exception on iajc w/out prior clean

Hi Diane -

re: "bad WeaverState.Kind: -115", kind 115 means
- extended
  - reweavable
    - compressed
    - diff
and should be understood by the 1.5.0 weaver.
Ron might be suggesting that the first build is with 
a recent weaver (produces kind 115), and the second 
with an older one (unable to understand kind 115).

Based on the original ant task you submitted, I'd suggest
removing the destination directory from the inpath and
adding forkclasspath when forking.  Also, if you want
to build incrementally, use the incremental flag.  There
is no optimization when batch- building a second time 
(unlike the Javac task, which can prune up-to-date
classes).
You can also explicitly set the reweavable options to see
if that makes a difference.
(Finally, I assume you are not running Ant against
the same target classes as AJDT/eclipse.)

Let us know how it works out!  Maybe it is a bug!
Wes

On Fri, 24 Feb 2006 12:58:57 -0800
 "Ron Bodkin" <rbodkin@xxxxxxxxxxxxxx> wrote:
> Hi Diane,
> 
> Could you post the ant task(s) that compile the AspectJ
> code? I am wondering
> if there's something about that that's causing the
> problem. How are you
> determining what classes to recompile? Is it possible
> that more than one ant
> task is recompiling to the same class files, but with
> different AspectJ
> configurations?
> 
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
> Nguyen, Diane
> Sent: Friday, February 24, 2006 9:43 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: RE: [aspectj-users] badWeaverState exception on
> iajc w/out prior
> clean
> 
> If I run ant clean, then ant, then ant again, things are
> fine, it
> succeeds because there weren't any changes to compile the
> second time.
> If I run ant clean, then ant, then make a change to my
> aspect or test,
> then ant again, I get the exception.
> 
> I found that one of my colleagues DID install older
> versions of AspectJ.
> There was an aspectjrt-1.1.1.jar in the ant lib
> directory, which I've
> deleted. There was also an older aspectjrt jar installed
> with Cactus. I
> removed the cactus jars from the classpath and removed
> our Cactus tests
> from the compilation. However, I still get the exception.
> 
> Other than that, I can't find any jars or source that was
> compiled with
> aspects or using the iajc task in my classpath or inpath.
> 
> Again, thanks your help!
> 
> diane
> 
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
> Ron Bodkin
> Sent: Wednesday, February 22, 2006 9:18 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: RE: [aspectj-users] badWeaverState exception on
> iajc w/out
> prior clean
> 
> Diane,
> 
> What happens if you run ant clean, then ant, then ant
> again? Does the
> problem occur? Are you able to narrow down which jar
> file(s) cause the
> problem and how they get created?
> 
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
> Nguyen, Diane
> Sent: Tuesday, February 21, 2006 1:17 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: RE: [aspectj-users] badWeaverState exception on
> iajc w/out
> prior clean
> 
> Thanks for the response!
> 
> Unfortunately, I don't think that's what is causing my
> bad WeaverState
> exception. I'm using ajdt 1.3.0 (the latest from the
> eclipse AJDT site)
> and AspectJ 1.5.0 from Dec 20 2005. These are the only
> aspectJ downloads
> I've installed on my computer, and this is the only iajc
> compilation in
> my build.xml file.
> 
> Does it matter what was used to compile the jars in my
> inpath? Just a
> stab in the dark...
> 
> thanks again!
> diane
> 
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
> Ron Bodkin
> Sent: Friday, February 17, 2006 4:57 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: RE: [aspectj-users] badWeaverState exception on
> iajc w/out
> prior clean
> 
> Hi Diane,
> 
> One likely reason for the problem is that you somehow
> have an older
> version of AspectJ that is doing some of the building.
> E.g., are you
> perhaps using a version of AJDT from before 1.5.0 final
> to build these
> same classes? AspectJ 1.5.0 would choke on the output of
> development
> releases of AJDT from before AspectJ 1.5.0 final (AJDT
> 1.3.0 final).
> 
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
> Nguyen, Diane
> Sent: Friday, February 17, 2006 4:40 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: [aspectj-users] badWeaverState exception on iajc
> w/out prior
> clean
> 
> Hello,
> 
> I am trying to compile junit tests and aspects in my
> application and
> keep running into a "bad WeaverState.Kind: -115" error
> when I recompile
> without cleaning all my source first. As rebuilding is
> obviously a bear
> to have to do each time I make a tweak, I'd love to learn
> why this
> occurs and how I can stop it.
> 
> I am using AspectJ 1.5.0, jdk1.5.0_02, ant 1.6.2.
> 
> Below are the iajc tag in my build.xml and the error
> output.
> 
> Any help/tips/corrections are greatly appreciated!
> Thanks!
> 
> diane
> 
> 		<iajc srcdir="${test.src}" 
> 			destdir="${test.classes}" 
> 			deprecation="${compile.deprecation}"
> 			debug="${compile.debug}"
> 			source="1.5"
> 			maxmem="640m"
> 			fork="true">
> 			<classpath>
> 				... lots of jars ...
> 			</classpath>
> 			<inpath>
> 				<pathelement location="some.jar"/>
> 				<pathelement location="another.jar"/>
> 				<pathelement location="${test.classes}"
> />
> 			</inpath>
> 
> 		</iajc>
> 
> 
> compile-tests-with-aspects:
>      [iajc] ABORT
>      [iajc]
>      [iajc] Exception thrown from AspectJ 1.5.0
> 
>      [iajc] This might be logged as a bug already -- find
> current bugs
> at
>      [iajc]
>
http://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component
> =Compiler
> 
>      [iajc] Bugs for exceptions thrown have titles
> File:line from the
> top stack,
> 
>      [iajc] e.g., "SomeFile.java:243"
> 
>      [iajc] If you don't find the exception below in a
> bug, please add a
> new bug
> 
>      [iajc] at
>
http://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
>      [iajc] To make the bug a priority, please include a
> test program
>      [iajc] that can reproduce this exception.
>      [iajc] bad WeaverState.Kind: -115
> 
>      [iajc] when batch building with classpath:
> <classpath here>
>      [iajc] bad WeaverState.Kind: -115
>      [iajc] java.lang.RuntimeException: bad
> WeaverState.Kind: -115
>      [iajc]     at
>
org.aspectj.weaver.WeaverStateInfo.read(WeaverStateInfo.java:
> 142)
>      [iajc]     at
> org.aspectj.weaver.AjAttribute.read(AjAttribute.java:98)
>      [iajc]     at
>
org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelA
> ttributes.java:59)
>      [iajc]     at
>
org.aspectj.weaver.bcel.BcelObjectType.unpackAspectAttributes
> (BcelObjectType.java:273)
>      [iajc]     at
>
org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.
> java:134)
>      [iajc]     at
>
org.aspectj.weaver.bcel.BcelWorld.makeBcelObjectType(BcelWorl
> d.java:257)
>      [iajc]     at
>
org.aspectj.weaver.bcel.BcelWorld.addSourceObjectType(BcelWor
> ld.java:314)
>      [iajc]     at
>
org.aspectj.weaver.bcel.BcelWeaver.addClassFile(BcelWeaver.ja
> va:386)
>      [iajc]     at
>
org.aspectj.weaver.bcel.BcelWeaver.addClassFile(BcelWeaver.ja
> va:401)
>      [iajc]     at
>
org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBce
> lWorld(AjBuildManager.java:658)
>      [iajc]     at
>
org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild
> (AjBuildManager.java:209)
>      [iajc]     at
>
org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBu
> ild(AjBuildManager.java:156)
>      [iajc]     at
>
org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:1
> 12)
>      [iajc]     at
>
org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:
> 60)
>      [iajc]     at
> org.aspectj.tools.ajc.Main.run(Main.java:326)
>      [iajc]     at
> org.aspectj.tools.ajc.Main.runMain(Main.java:240)
>      [iajc]     at
> org.aspectj.tools.ajc.Main.main(Main.java:83)
> 
> 
>      [iajc] 1 fail|abort
> 
> BUILD FAILED
> C:\views\yadda-yadda-yadda\build.xml:386:
> failure[-1] running ajc
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top