[jboss-jira] [JBoss JIRA] (AS7-6041) CDI Decorator for a JAX-RS annotated interface results in WELD-001306
Stuart Douglas (JIRA)
jira-events at lists.jboss.org
Wed Feb 6 16:43:51 EST 2013
[ https://issues.jboss.org/browse/AS7-6041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752657#comment-12752657 ]
Stuart Douglas commented on AS7-6041:
-------------------------------------
There are two parts to this bug. One was that the JAX-RS CDI extension was adding a scope to decorator classes, which breaks Weld.
The other part is in the AS7 integration that should exclude decorator classes from JAX-RS scanning, which I will do once my RESTeasy patch makes it into AS7.
I don't think it will ever be possible to fix this 100%, as it is possible for a portable extension to make any class into a decorator, however I think that is such an edge case that it is not worth worrying about.
> CDI Decorator for a JAX-RS annotated interface results in WELD-001306
> ---------------------------------------------------------------------
>
> Key: AS7-6041
> URL: https://issues.jboss.org/browse/AS7-6041
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.1.Final
> Reporter: Daniel Sachse
> Assignee: Stuart Douglas
> Fix For: 7.2.0.Alpha1
>
>
> I already bugged the Errai and Resteasy guys with my problem, but I was told that you guys are in charge of this ;)
> I possibly discovered a bug in the Weld implementation provided with JBoss 7.1.1.Final.
> I was playing around with Errai and JAX-RS and I discovered that when I add the JAX-RS annotations to the interface this works as expected.
> As soon as I start to use a CDI Decorator with the JAX-RS interface, i start getting the following error:
> "org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001306 Attempting to inject an unproxyable normal scoped bean Decorator….."
> If I then put the JAX-RS annotations back at the implementation, everything works fine. Unfortunately this behavior is not working for me, because Errai needs the annotations at the interface to create client code.
> As I was unsure if this only happened with Errai on the classpath, I created a very little demo project, which exactly shows the bug I mentioned: https://github.com/w0mbat/RESTTest
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list