[jboss-dev-forums] [JBoss AS 7 Development] - No EJB receiver available for handling in JBoss AS 7

Zaw Than Oo do-not-reply at jboss.com
Wed May 30 06:21:19 EDT 2012


Zaw Than Oo [https://community.jboss.org/people/javamutu] created the discussion

"No EJB receiver available for handling in JBoss AS 7"

To view the discussion, visit: https://community.jboss.org/message/738735#738735

--------------------------------------------------------------
When I loockup the EBJ Remote by JNDI, I get the the following exception.

INFO: Connection default will not be available in EJB client context org.jboss.ejb.client.EJBClientContext at 60420f
Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:YomaBankService,distinctname:]

My EJB Module and Configuration is : 

In jboss-ebj-jndi.properties,

endpoint.name=client-endpoint
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

remote.connections=default

remote.connection.default.host=10.20.30.40
remote.connection.default.port = 4447
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

remote.connection.default.username=admin
remote.connection.default.password=admin

Libray is :

jboss-ejb-api_3.1_spec-1.0.1.Final.jar
jboss-ejb-client-1.0.0.Beta11.jar
jboss-logging-3.1.0.CR2.jar
jboss-marshalling-1.3.4.GA.jar
jboss-marshalling-river-1.3.4.GA.jar
jboss-remoting-3.2.0.CR6-darranl-1.jar
jboss-sasl-1.0.0.Beta9.jar
jboss-transaction-api_1.1_spec-1.0.0.Final.jar
xnio-api-3.0.0.CR5.jar
xnio-nio-3.0.0.CR5.jar

Reference :

|  | java:global/YomaBankService/YomaBankService!com.mutu.gbt.ejb.interfaces.IYomaBankServiceLocal |
|  | java:app/YomaBankService/YomaBankService!com.mutu.gbt.ejb.interfaces.IYomaBankServiceLocal |
|  | java:module/YomaBankService!com.mutu.gbt.ejb.interfaces.IYomaBankServiceLocal |
|  | java:global/YomaBankService/YomaBankService!com.mutu.gbt.ejb.interfaces.IYomaBankServiceRemote |
|  | java:app/YomaBankService/YomaBankService!com.mutu.gbt.ejb.interfaces.IYomaBankServiceRemote |
|  | java:module/YomaBankService!com.mutu.gbt.ejb.interfaces.IYomaBankServiceRemote |
|  | java:jboss/exported/YomaBankService/YomaBankService!com.mutu.gbt.ejb.interfaces.IYomaBankServiceRemote |

My EJB Client is :

package com.mutu.gbt.ejb.client;

import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import com.mutu.gbt.ejb.Bank;
import com.mutu.gbt.ejb.Customer;
import com.mutu.gbt.ejb.YomaBankService;
import com.mutu.gbt.ejb.interfaces.IYomaBankServiceRemote;
import com.mutu.gbt.interfaces.IYomaBankService;

public class YomaBankServiceClient2 {
    public Context getInitialContext() throws NamingException {
        Properties jndiProperties = new Properties();
        jndiProperties.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
        return new InitialContext(jndiProperties); 
    }

    private IYomaBankService getYomaBankService() {
        IYomaBankService result = null;
        try {
            String applicationName = "";
            String moduleName = "YomaBankService";
            String distinctName = "";
            String beanName = YomaBankService.class.getSimpleName();
            System.out.println("BeanName \t:" + beanName);
            String viewClassName = IYomaBankServiceRemote.class.getName();
            System.out.println("ViewClassName \t:" + beanName);
            Context context = getInitialContext();
            IYomaBankServiceRemote yomaBankServiceRemote = (IYomaBankServiceRemote)context.lookup("ejb:" + applicationName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName);
            result = (IYomaBankService)yomaBankServiceRemote;
        } catch(NamingException e) {
            e.printStackTrace();
        }
        return result;
    }

    public void runtTest() {
        IYomaBankService yomaBankService = getYomaBankService();
        Customer from = new Customer("zawthanoo", "Zaw Than Oo");
        Customer to = new Customer("test", "Test User");
        yomaBankService.transferCash(from, to, 5000, Bank.KBZ);
    }

    public static void main(String[] args) {
        YomaBankServiceClient2 client = new YomaBankServiceClient2();
        client.runtTest();
    }
}
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/738735#738735]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120530/cb3faf68/attachment.html 


More information about the jboss-dev-forums mailing list