Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-2093

Injection of MP-Rest-Client fails

    Details

      Description

      I have a MP-Rest-Client interface

      @Path("/")
      @RegisterRestClient
      @Produces(MediaType.APPLICATION_JSON)
      public interface BackendService {
      

      and wan to inject it into my JAX-RS bean

      @Path("/")
      public class FrontendHandler {
      
        @Inject
        @RestClient
        BackendService service;
      

      which fails with a CDI error.The same code works on both OpenLiberty 18.1 and Payara Micro

      2018-07-03 12:28:48,200 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: WFSWARM0004: Deployment failed: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"frontend.war\".WeldStartService" => "Failed to start service
      2018-07-03 12:28:48,200 ERROR [stderr] (main)     Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type BackendService with qualifiers @Default
      2018-07-03 12:28:48,200 ERROR [stderr] (main)   at injection point [UnbackedAnnotatedField] @Inject de.bsd.jfs2018.frontend.FrontendHandler.service
      
      

      Ken Finnigan is investigating this and it looks like some unwanted dependency is pulled in somewhere and causing havoc

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                kenfinni Ken Finnigan
                Reporter:
                pilhuhn Heiko Rupp
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: