XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Rejected
    • 7.1.1.Final
    • None
    • EJB
    • None

    Description

      Hi,
      I just deployed a sample ejb3 in jboss 7.1.1
      Name of module is ejb3.jar, i see on the log server follow :
      "
      java:global/ejb3/CalculatorEJB!org.begonia.calculator.CalculatorRemote
      java:app/ejb3/CalculatorEJB!org.begonia.calculator.CalculatorRemote
      java:module/CalculatorEJB!org.begonia.calculator.CalculatorRemote
      java:jboss/exported/ejb3/CalculatorEJB!org.begonia.calculator.CalculatorRemote
      java:global/ejb3/CalculatorEJB!org.begonia.calculator.CalculatorLocal
      java:app/ejb3/CalculatorEJB!org.begonia.calculator.CalculatorLocal
      java:module/CalculatorEJB!org.begonia.calculator.CalculatorLocal
      "
      My client

      public class CalculatorTest {
      public static Context getContext() throws NamingException

      { Properties properties = new Properties(); properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); properties.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); properties.setProperty(Context.PROVIDER_URL, "remote://127.0.0.1:4447"); properties.put(Context.SECURITY_PRINCIPAL,"jbossclient"); properties.put(Context.SECURITY_CREDENTIALS,"0123456789"); return new InitialContext(properties); }

      public static void test() throws NamingException, InterruptedException

      { Context iContext = getContext(); Object c = iContext.lookup("ejb:/ejb3//CalculatorEJB!org.begonia.calculator.CalculatorRemote" ); System.out.println(((CalculatorRemote)c).sum(1,2)); }

      public static void main(String[] args) throws NamingException, RemoteException, CreateException, InterruptedException

      { CalculatorTest.test(); }

      }

      When i run client, catch exception
      Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:ejb3,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@10da5eb

      When i hide the line
      /*properties.setProperty(Context.URL_PKG_PREFIXES,
      "org.jboss.ejb.client.naming");*/
      run the client i catch exception
      javax.naming.NameNotFoundException: ejb:/ejb3//CalculatorEJB!org.begonia.calculator.CalculatorRemote – service jboss.naming.context.java.jboss.exported.ejb:.ejb3."CalculatorEJB!org.begonia.calculator.CalculatorRemote"

      Who can help me fix this bug?
      thanks.

      Attachments

        Activity

          People

            jaikiran Jaikiran Pai (Inactive)
            nhatphung Nhat Nguyen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: