CDI faqs and common issues

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Weld BootstrapService exception

If you are starting to practice with CDI on Weld container, a common obscure exception that you might get is the following one:

JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.deployment.unit."jmsdemo.war".WeldBootstrapService (unavailable) dependents: [service jboss.deployment.unit."jmsdemo.war".CdiValidatorFactoryService, service jboss.deployment.unit."jmsdemo.war".component."javax.faces.webapp.FacetTag".WeldInstantiator, service jboss.deployment.unit."jmsdemo.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".WeldInstantiator, service jboss.deployment.unit."jmsdemo.war".component."com.sample.Test".WeldInstantiator, JBAS014799: ... and 10 more ]
      service jboss.deployment.unit."jmsdemo.war".WeldStartService (unavailable)
 dependents: [service jboss.deployment.unit."jmsdemo.war".CdiValidatorFactoryService, service jboss.deployment.unit."jmsdemo.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".WeldInstantiator, service jboss.deployment.unit."jmsdemo.war".component."com.sample.Test".WeldInstantiator, service jboss.undertow.deployment.default-server.default-host./jmsdemo.UndertowDeploymentInfoService, JBAS014799: ... and 7 more ]
      service jboss.deployment.unit."jmsdemo.war".component.MyEJB.JndiBindingsService (unavailable) dependents: [service jboss.deployment.unit."jmsdemo.war".jndiDependencyService]

 This is a quite difficult to understand error, however most likely you have included in your code some CDI APi like:

@Stateless
public class MyEJB {
	@Inject
	JMSContext context;

	. . .
}

 ...but you have forgot to include the file beans.xml in the WEB-INF.xml folder so there is a failure in activating CDI.

Follow us on Twitter