6 Replies Latest reply on Feb 10, 2006 9:31 AM by Alexander Langer

    help on

    Ivaylo Kabakov Newbie

      Hi all!

      I have a problem running the simplest app, i.e. the canonical "hello world". I downloaded version 4.0.4RC1 of the AS, installed the ejb-clustered profile and packaged an hello404.ejb3 archive, containing just two files - the hello bean and its remote interface.
      The interface:

      package org.hello;
      import javax.ejb.Remote;
      
      @Remote
      public interface Hello {
       public String sayHello();
      }

      and the bean:
      package org.hello;
      
      import javax.ejb.Stateless;
      import org.hello.Hello;
      
      public @Stateless class HelloBean implements Hello {
       public String sayHello() {
       return "hello!";
       }
      }

      The client I put up is:
      package org.hello.client;
      
      import javax.naming.Context;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;
      import org.hello.Hello;
      
      public class HelloClient {
       public static void main(String[] args) {
       try {
       Context ctx = new InitialContext();
       Hello hello = (Hello) ctx.lookup(Hello.class.getName());
       System.out.println(hello.sayHello());
       } catch (NamingException e) {
       e.printStackTrace();
       }
       }
      }
      

      When I run it, an exception
      javax.naming.NameNotFoundException: org.hello.Hello not bound
      ...

      is thrown.

      Actually, when deploying the bean the server outputs:
      INFO [Ejb3AnnotationHandler] found EJB3: ejbName=HelloBean, class=org.hello.HelloBean, type=STATELESS
      INFO [Ejb3Deployment] EJB3 deployment time took: 172
      INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,jar=hello404.ejb3,name=HelloBean with dependencies:
      INFO [EJB3Deployer] Deployed: file:/C:/java/jboss-4.0.4RC1/server/default/deploy/hello404.ejb3

      I don't see a message, indicating that the remote interface is found and have no idea what should do.

      Running on windows, with eclipse 3.1.2 and jbossIDE 1.5.0RC1.