Hide Forgot
Created attachment 836322 [details] error log Description of problem: After deploying a simple rest app I'm getting the following error: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped Version-Release number of selected component (if applicable): ER7 How reproducible: always Steps to Reproduce: 1. Deploy rest-example into SOA 6.0.0.ER7 (rest-exaple.zip is eclipse project) 2. Go to http://localhost:8080/rest/hello/World Actual results: See the attached file error.log Expected results: It should return 'Hello World'
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.