File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes Elementary Query around JBoss and EJB3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Elementary Query around JBoss and EJB3" Watch "Elementary Query around JBoss and EJB3" New topic

Elementary Query around JBoss and EJB3

Anoop Jain

Joined: Jun 17, 2009
Posts: 2
Hi All,

Am trrying to deploy an EJB-3 stateless bean on JBoss but am unable to do that. Will appreciate if anyone can let me know what's wrong. In did the following:

[1] Created Bean and Local/Remote Interfaces:-

[2] Created a client to test the above:

[3] The client will have the following in its classpath

[4] Created an application.xml file to be used for EAR

[5] Created a build.xml that will package an EAR file and will place the EAR in the JBoss-default folder:

[6] AFter running the build file, I can see the following JBoss server console:

17:56:27,658 INFO [EARDeployer] Init J2EE application: file:/H:/jboss-4.0.4/server/default/deploy/calc.ear
17:56:28,017 INFO [EARDeployer] Started J2EE application: file:/H:/jboss-4.0.4/server/default/deploy/calc.ear

[7] However there is no entry corresponding to the Calc bean/interfaces in the JNDIView MBean on the JMX Console.

[8] And consequently when I run the client it fails:-

Exception in thread "main" javax.naming.NameNotFoundException: Calc not bound
at org.jnp.server.NamingServer.getBinding(
at org.jnp.server.NamingServer.getBinding(
at org.jnp.server.NamingServer.getObject(

Any help will be hugely appreciated.
Peter Johnson

Joined: May 14, 2008
Posts: 5852

I think that the EJB should be named "calc/Calc/remote", is that name in the JNDI tree?

What version of JBoss AS are you using?

Could you post the contents of calc.ear? To do so, run the following:

jar -tf calc.ear

JBoss In Action
I agree. Here's the link:
subject: Elementary Query around JBoss and EJB3
It's not a secret anymore!