Community
Participate
Working Groups
Build Identifier: STS Version: 2.8.0.RELEASE Build Id: 201110171000 Currently can reproduce consistently when applying an aspect that has a declare parents declaration that uses an annotation attribute as a discriminator AND the compliation unit (class) contains another annotation that subsequently contains child annotations. i.e. Aspect has: declare parents: @SomeAnnotation(someAttribute=someValue) * extends SomeClass; Compilation Unit contains annotations of: @SomeAnnotation(someAttribute = someValue) @YetAnotherAnnotation(value = @SomeChildAnnotation) public class Example { ... } Here is the specific stack trace from my instance, but can reproduce generically. [ERROR] Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [@NamedQuery(name = "Department.findAll",query = "select d from Department d order by d.name ASC",hints = {@QueryHint(name = "org.hibernate.cacheable",value = "true")})] [ERROR] org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType$MissingImplementationException: Please raise an AspectJ bug. AspectJ does not know how to convert this annotation value [@NamedQuery(name = "Department.findAll",query = "select d from Department d order by d.name ASC",hints = {@QueryHint(name = "org.hibernate.cacheable",value = "true")})] [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.generateElementValueForNonConstantExpression(EclipseSourceType.java:796) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.generateElementValue(EclipseSourceType.java:765) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.generateElementValueForNonConstantExpression(EclipseSourceType.java:809) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.generateElementValue(EclipseSourceType.java:765) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.generateAnnotation(EclipseSourceType.java:721) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.convertEclipseAnnotation(EclipseSourceType.java:676) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.getAnnotations(EclipseSourceType.java:656) [ERROR] at org.aspectj.weaver.ReferenceType.getAnnotationOfType(ReferenceType.java:224) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:122) [ERROR] at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:96) [ERROR] at org.aspectj.weaver.patterns.AnyWithAnnotationTypePattern.matchesExactly(TypePattern.java:568) [ERROR] at org.aspectj.weaver.patterns.TypePattern.matchesStatically(TypePattern.java:133) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.match(DeclareParents.java:63) [ERROR] at org.aspectj.weaver.patterns.DeclareParents.findMatchingNewParents(DeclareParents.java:358) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doDeclareParents(AjLookupEnvironment.java:880) [ERROR] at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:730) Reproducible: Always Steps to Reproduce: 1. Define an aspect with declare parents that depends on an annotation with an attribute value 2. Define a class that has that annotation and attribute value, as well as another annotation that contains child annotations (i.e. @NamedQueries({ @NamedQuery...) 3. Compile.
I implemented some of the missing functionality. marker annotation values are now supported @Foo(value=@Bar) However, it looks like although you don't mention it in the little test example references, the original exception message indicates support is required for full nested annotations: @Foo(value=@Bar(value=34)) that'll take a little longer to support.
ok, i constructed a testcase based on the actual kinds of annotation from your stack trace, and fixed all that. It should be a in a dev build later today, let me know if you still hit some of the gaps (missing impls).
(In reply to comment #2) > ok, i constructed a testcase based on the actual kinds of annotation from your > stack trace, and fixed all that. > > It should be a in a dev build later today, let me know if you still hit some of > the gaps (missing impls). Thanks for the quick turnaround...I will grab the dev build and test it out. Thanks!
Test it with the development build. Looks good. Thanks again!
Andy, I didn't see a release schedule on the site...do you have an idea of the time frame (ballpark) for the next release that will include these fixes? Thanks! jaime
Hi Jaime, Sorry about that, plans get out of date so fast :) The big thing in 1.7.0 will be moving to the Eclipse Java7 compiler, but I think I can do a milestone before that big piece of work gets done. I'm imagining a 1.7.0.M1 at christmas time then ideally 1.7.0 final in 1Q2012, possibly 2Q. Does that work for you?