Error while testing a SwitchYard project with UserTransaction dependency: "WELD-001408 Unsatisfied dependencies ..."

Solution Verified - Updated -

Issue

  • There is an error that prevents the SwitchYard tests from executing which relates to the fact that in a class there is an @Inject of the UserTransaction.

    org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [UserTransaction] with qualifiers [@Default] at injection point [[field] @Inject private com.redhat.samples.switchyard.GreetingServiceImpl.ut]
    
  • The SwitchYard Bean service under test has a UserTransaction field injected like this:

    @Service(GreetingService.class)
    public class GreetingServiceImpl implements GreetingService {
    
        @Inject
        private UserTransaction ut;
    

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.0.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content