The above Error indicates that you are passing an incorrect JNDI name to the lookup method while trying to lookup.
Check your log to see find your EJB is deployed with exactly which JNDI names. As you are migrating from JBoss AS6 to WildFly hence it is quite possible that your code might be trying to use the non EE6 Portable JNDI naming, Which might be leading to this issue.
Check the following link to know more about Portable JNDI Syntax: JNDI Reference - WildFly 8 - Project Documentation Editor to know more about "java:global", "java:app" and "java:module"
Try with the following JNDI format for testing (OR check your log to find the JNDI name listed there for the Bean CrdsEjbController):
java:global[/application name]/module name/enterprise bean name[/interface name]
You can try the java:global, java:app, java:module naming prefix for your EJB JNDI lookup based on Where the EJB is actually deployes as part of the same Module/Same App or deployed in the same server as the EJB Client you can choose the suitable JNDI name. However "java:global" prefixed name should work fine in any case where the EJB Bean and the Client is deployed on the same server. So please try the following:
ctx = new InitialContext();
String CRDS_EJB_CONTROLLER = "java:global/DiscoEAR/discoEjb/CrdsEjbController!com.boeing.crds.arch.control.ejb.CrdsEjbControllerHome";
home = (CrdsEjbControllerHome) ctx.lookup(CRDS_EJB_CONTROLLER);
Is there any way where we can declare JNDI names globally as below ?
java:global [/application name]/module name/enterprise bean name[/interface name]
Because I have to modify in many places in the same manner for each ejb.