IllegalStateException: Resolution should not happen via injection container in JBoss EAP 5.1

Solution Unverified - Updated -


  •      This looks like it is stopping the WAR file from veing deployed.

    Caused by: java.lang.IllegalStateException: Resolution should not happen via injection container
      at org.jboss.web.tomcat.service.TomcatInjectionContainer.getEjbJndiName(
      at org.jboss.injection.EjbEncInjector.inject(
      at org.jboss.web.tomcat.service.TomcatInjectionContainer.populateEnc(
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(
      ... 69 more 
  • My code for accessing the EJB from within my  JSF2 app is basically:

    @ManagedBean(name = "queryBean")
    public class QueryBean {
              MyEJBRemote ejb;
  • If I do a JNDI lookup as in the code below, everything seems to work OK and the WAR is deployed and can access the EJB.

         Context ctx = new InitialContext();
         MyEJBRemote ejb = (MyEJBRemote) ctx.lookup("MyEJBService/remote");


  • JBoss Enterprise Application Platform (EAP)
    • 5.1

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