-
Feature Request
-
Resolution: Unresolved
-
Major
-
None
-
1.1.12.Final
-
None
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
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>