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.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922269#3922269

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922269


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to