Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-2082

"Could not inject members" when running inside glassfish-embedded-3.1

    Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.12.Final
    • Fix Version/s: None
    • Component/s: GlassFish Containers
    • Labels:
      None

      Description

      I have a project with some simple Rest services a some beans (with @ApplicationScoped) and a test that runs correctly when

      {@Deployment(testable = false)}

      .
      However, if I set

      {testable = true}

      and try to retrive some component in the test, for instance:

      @Inject
      private UserServiceImpl userService;

      Test fails with the message

      java.lang.RuntimeException: Could not inject members

      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:135)
      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.enrich(CDIInjectionEnricher.java:78)
      ...
      Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001408: Unsatisfied dependencies for type HelloWorldResource with qualifiers @Default
      at injection point [BackedAnnotatedField] @Inject private com..payara.HelloTest.helloWorldResource
      at com..payara.HelloTest.helloWorldResource(HelloTest.java:0)

      Notes:
      · Same code runs (with appropriate changes) on Wildfly-swarm
      · Just in case it could be related, I have a multipart upload service, so I need to initialize the components like this:

      @ApplicationPath("/app/v1/")
      public class DemoPayaraApplication extends ResourceConfig {
      public DemoPayaraApplication()

      Unknown macro: { packages("com.everis.payara"); register(MultiPartFeature.class); }

      }

      And add additional dpendencies

      <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>2.25.1</version>
      <scope>provided</scope>
      </dependency>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                abelsromero Abel Salgado Romero
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: