mercredi 6 mai 2015

Error in wildfly 8.1.0 making a EJB remote invocation

i have made an application in wildly 8.1.0 that uses a EJB remote session bean, but when i do the lookup i get this error:


EJBCLIENT000025: No EJB receiver available for handling [appName:rb, moduleName:remot, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@75f1b0bc


I have configured the application.xml file and module.xml file to use the "rb" application name and "remot" module name. When I start the server, It starts without errors, and deploys the EJB, so i think the problem is in the client, this is the code of the client:


@SuppressWarnings({ "rawtypes", "unchecked" }) private static void busquedaServidor(Server.DatosRegistro datos) throws NamingException {
final Hashtable jndiProperties = new Hashtable(); jndiProperties.put(Context.URL_PKG_PREFIXES,"org.jboss.ejb.client.naming); final Context context = new InitialContext(jndiProperties);

    final String appName = "rb";

    final String moduleName = "remot";

    final String distinctName = "";

    final String beanName = Ejb.class.getSimpleName();

    final String viewClassName = EjbRemote.class.getName();

    String url = "ejb:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName;
    //ejb:rb/remot//Ejb!Server.EjbRemote

    System.out.println(url);
    EjbRemote envio= (EjbRemote) context.lookup(url);
    envio.datosRegistro(datos);**
}


Maybe the error is in the distinct name, that is empty, thanks for your help.

Aucun commentaire:

Enregistrer un commentaire