You are starting at the wrong point when trying to resolve this problem. A 'NameNotFoundException' usually without fail means that it is not bound.
Remove everything that you have currently deployed
Deploy your jar containing the ejb
Check the console to see if any errors are reported
Open jmx_console and use the JNDI View MBean to list the contents of JNDI, confirm that your bean is bound and check the name.
It is only at this point that you are ready to run a client application to access the bean.
Well JNDI View do not find my bean but console do not return errors
The fact your bean is not displayed in JNDI View means that your bean is not deployed.
How do you start JBoss?
What is displayed on the console when you deploy your jar file?
Can you please extract your jar file and show the complete contents here.
What does your ejb-jar.xml look like?
I run Jboss by runing run.bat .
When I copy wybory.jar into ...\server\default\deploy there is no signal on the console.
When I unpack it I have 2 directories :
the ejb-jar.xml looks like this :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
I am using Jboss 4.0.1
Is that really the name of the folder that contains the ejb-jar.xml? It should be 'META-INF'.
The lack of output on the console suggests that the ejb-jar.xml is not found in 'META-INF' and this is why the bean is not deploying.
If you have a look in server/default/log/server.log the last entries will show you if the jar was seen and what happened during deplyment. If you see a line near the end saying: -
DEBUG [org.jboss.deployment.JARDeployer] No xml files found
it confirms that the XML deployment descriptors were not found.
Hmm its strange or silly but when I deploy it in the minimal/deploy its looks like working at least JNDI View see thats Bean. Hmm I thougth that when I run Jboss its strart in default configuration ....
is it oki?
Hmm I have got another problem now ....
In my program i write :
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup(JNDI_NAME);
ModelHome home = (ModelHome)PortableRemoteObject.narrow(obj,ModelHome.class);
and compilator dont know ModelHome object ... is it becouse of Jboss or did I make somethink wrong againe :(