-
1. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
paul.robinson May 2, 2013 10:12 AM (in response to paul.robinson)Ok, I think I've answered my own question. Oracle have @NonBinding on their version of the API, so looks like I'll be raising a PR on the transactions api project.
Paul.
-
2. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
paul.robinson May 2, 2013 12:34 PM (in response to paul.robinson)I think I spoke too soon. I've added @Nonbinding, to match Oracle's version of the annotation, and I still get this error:
org.jboss.weld.exceptions.DefinitionException: WELD-001101 Member of array type or annotation type must be annotated @NonBinding: [EnhancedAnnotatedMethodImpl] public abstract javax.transaction.Transactional.rollbackOn2()
I changed the attribute name to 'rollbackOn2', just to make sure I was in-fact getting the updated class.
This is what my interceptor binding annotation now looks like:
@Inherited @InterceptorBinding @Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD}) public @interface Transactional { @Nonbinding TxType value() default TxType.REQUIRED; public enum TxType { REQUIRED, REQUIRES_NEW, MANDATORY, SUPPORTS, NOT_SUPPORTED, NEVER } @Nonbinding Class[] rollbackOn2() default {}; @Nonbinding Class[] dontRollbackOn() default {}; }
Any ideas what I'm missing?
Cheers,
Paul.
-
3. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
mkouba May 2, 2013 3:58 PM (in response to paul.robinson)Hi Paul,
your code seems to be ok. What version of weld do you use?
-
4. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
paul.robinson May 3, 2013 3:32 AM (in response to mkouba)Martin,
Thanks for taking a look. I'm using the version in WildFly master (2.0.0.CR4).
Paul.
-
5. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
mkouba May 3, 2013 4:33 AM (in response to paul.robinson)Hm, I cannot reproduce this failure. Do you really use javax.enterprise.util.Nonbinding?
-
6. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
paul.robinson May 3, 2013 8:19 AM (in response to mkouba)Martin,
Thanks for trying to reproduce.
Hm, I cannot reproduce this failure.
Ok, I'll try and create a simple test case and apply it to WildFly master. I'm currently working on a modified version that pulls in the JTA 1.2 spec jar.
Do you really use javax.enterprise.util.Nonbinding?
Yes, I wondered that too. It's definitely that particular @Nonbinding.
Paul.
-
7. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
paul.robinson May 6, 2013 6:20 AM (in response to paul.robinson)Martin,
I've now managed to reproduce the issue. You should be able to reproduce it in a few minutes using the simplified example and reproduction steps here: https://github.com/paulrobinson/nonbinding-issue
In a nutshell, it seems like the @Nonbinding annotation is lost when the Interceptor binding is part of a JBoss Module. It is not lost if it is co-located with the code, or if it is in a .jar bundled with the war.
Thanks for taking a look,
Paul.
-
8. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
mkouba May 6, 2013 9:42 AM (in response to paul.robinson)Paul,
I'm no AS/modules expert but I think your modules.xml file is missing some dependencies (mainly javax.enterprise.api). If I add
<dependencies> <module name="javax.api"/> <module name="javax.enterprise.api"/> </dependencies>
the test seems to pass...
-
9. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
paul.robinson May 6, 2013 9:02 AM (in response to mkouba)Martin,
Thanks a lot! Yes, you are right, that was the problem. I can kind of see why that would fix it, but I don't understand fully. Something for me to figure out.
Thanks again,
Paul.
P.S. your XML is a bit broken. The open and close 'dependencies' tags both have an extra '/' in them.
-
10. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
mkouba May 6, 2013 9:10 AM (in response to paul.robinson)XML snippet fixed
-
11. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
paul.robinson May 6, 2013 9:37 AM (in response to mkouba)Martin Kouba wrote:
XML snippet fixed
Almost, but still not quite right ;-)
-
12. Re: WELD-001101 Member of array type or annotation type must be annotated @NonBinding
mkouba May 6, 2013 9:45 AM (in response to paul.robinson)Oops, I should have read the fix before posting