0 Replies Latest reply on Sep 23, 2014 2:09 PM by 7ashiro

    No EJB receiver available for handling

    7ashiro

      I don't really get why i'm i getting this type of error. I've searched and many of the solutions i've found doesn't solve my issue here.

       

      Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:aplication, moduleName:fillDatabase, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@eb203b

        at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:735)

        at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)

        at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)

        at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:253)

        at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:198)

        at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)

        at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)

        at $Proxy0.importXml(Unknown Source)

        at principal.PopularBancoCliente.processarArquivos(fillDatabaseClient.java:108)

        at principal.PopularBancoCliente.processarArquivos(fillDatabaseClient.java:95)

        at principal.PopularBancoCliente.main(fillDatabaseClient.java:58)

       

      My code is like this:

       

      private static fillDatabase service;

      @SuppressWarnings({ "rawtypes", "unchecked" })

        private static fillDatabase getService() throws NamingException {

        final Hashtable jndiProperties = new Hashtable();

        jndiProperties.put("jboss.naming.client.ejb.context", true);

        jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

        final Context i = new InitialContext(jndiProperties);

        final String appName = "aplication";

        final String moduleName = "fillDatabase";

        final String distinctName = "";

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

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

        System.out.println("ejb:"+appName+"/"+moduleName+ "/"  + distinctName + "/" +beanName +"!" + viewClassName);

        service = (fillDatabase)  i.lookup("ejb:"+appName+"/"+moduleName+ "/" + distinctName + "/" +beanName +"!" + viewClassName);

        return service;

        }

       

      Can anyone help me?

       

      ---------------------- EDITED ---------------------------

      Solved, just had to add this properties to the project:

      jboss-ejb-client.properties