[arquillian-issues] [JBoss JIRA] (ARQ-2082) "Could not inject members" when running inside glassfish-embedded-3.1

Abel Salgado Romero (JIRA) issues at jboss.org
Mon Mar 6 12:21:00 EST 2017


Abel Salgado Romero created ARQ-2082:
----------------------------------------

             Summary: "Could not inject members" when running inside glassfish-embedded-3.1
                 Key: ARQ-2082
                 URL: https://issues.jboss.org/browse/ARQ-2082
             Project: Arquillian
          Issue Type: Feature Request
          Components: GlassFish Containers
    Affects Versions: 1.1.12.Final
         Environment: payara.micro= 4.1.1.171.0.1
arquillian.version = 1.1.12.Final
glassfish-embedded-3.1= 1.0.0.Final
            Reporter: Abel Salgado Romero


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:
{quote}
@Inject
private UserServiceImpl userService;
{quote}

Test fails with the message
{quote}
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)

{quote}

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:
{quote}
@ApplicationPath("/app/v1/")
public class DemoPayaraApplication extends ResourceConfig {
    public DemoPayaraApplication() {
        packages("com.everis.payara");
        register(MultiPartFeature.class);
    }
}
{quote}
And add additional dpendencies
{quote}
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>2.25.1</version>
      <scope>provided</scope>
    </dependency>
{quote}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the arquillian-issues mailing list