| Summary: | No active contexts for scope type javax.enterprise.context.RequestScoped | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Fuse Service Works 6 | Reporter: | Andrej Podhradsky <apodhrad> | ||||||||
| Component: | SwitchYard | Assignee: | Magesh Kumar Bojan <mbojan> | ||||||||
| Status: | CLOSED NOTABUG | QA Contact: | Jiri Sedlacek <jsedlace> | ||||||||
| Severity: | urgent | Docs Contact: | |||||||||
| Priority: | low | ||||||||||
| Version: | 6.0.0 | CC: | aileenc, atangrin, dlesage, oskutka, rcernich, soa-p-jira, tcunning | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: |
If you use JAX-RS annotations on the interface implemented by your bean service, you may encounter an error. It is a good idea not to use binding annotations directly on service interfaces as it clutters the abstract service contract with binding-specific details. Separate JAX-RS annotations into a distinct interface to avoid confusing CDI/Weld.
|
Story Points: | --- | ||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2014-11-11 21:12:13 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Attachments: |
|
||||||||||
|
Description
Andrej Podhradsky
2013-12-13 13:25:36 UTC
Created attachment 836323 [details]
rest-example
This is due to the fact that you are using JAX-RS annotations on the interface implemented by your bean service. We don't recommend using binding annotations directly on service interfaces as it pollutes the abstract service contract with binding-specific details. In this particular case, it looks like CDI/Weld is getting confused because the actual CDI bean has JAX-RS annotations on the interface it's using. All you need to do is separate out the JAX-RS annotations into a distinct interface (e.g. HelloResource) and the app will work just fine. I have attached a revised version for reference. Created attachment 836329 [details]
updated example
The updated example works fine and if it is correct behaviour then this isses can be closed. I'm just wondering why it is working in switchyard-1.1.0.Final-EAP6.1.GA and not in FSW. mbojan could you please verify whether or not behavioral differences exist between FSW 6.0 and 6.1? If there are differences, please document what it would take to make FSW 6.1 behave like 6.0. Thanks in advance. Hey Magesh, please ignore my last comment. I misread Andrej's statement. It looks like the difference is between community and product. Could you please investigate why that might be happening (if it still occurs in FSW 6.1). This did work on 1.1, but with more recent changes it doesn't appear to work on community + EAP. Tested it on 2.0.0-SNAPSHOT + EAP-6.3 and got the same error described here. I don't think there are behavioral differences in this area between product and community - I'm getting similar results using the example here. |