wood burning stoves
The moose likes EJB and other Java EE Technologies and the fly likes Error:CalculatorBeanRemote not bound Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Error:CalculatorBeanRemote not bound" Watch "Error:CalculatorBeanRemote not bound" New topic

Error:CalculatorBeanRemote not bound

Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
Hi Good People,

I am developing a sample EJB3 application in eclipse3.4. I am following the following steps:

1) First of all i am creating an EJB project (testEJB) in the eclipse. While creating this Project i am selecting the options of 1) Create an EJB Client Jar Module (testEJBClient) to hold the client interfaces and classes and 2) Add Project to an EAR (testEJBEAR) for this project. So it will create three different projects with the given names in the eclipse.
2) Now in the project testEJB i will create a stateless session bean. Its corresponding remote interface will be automatically created in the testEJBClient. Now i will declare a simple method hello() in the remote interface and will implement it in the testEJB.
So this completes my ejb beans.
3) Now in the third step i am creating a dynamic web project (with jboss as server). In this project's properties, in the java EE Module Dependencies section i am giving reference to both the testEJB.jar and testEJBClient.jar so that i can access the method in my jsp or servlets. My index.jsp is looks like:

But when i am trying to run this file it is giving the following exception :

Error:com.CalculatorBeanRemote not bound

I am trying to solve this from last 3 days but still not successful. If any one has any idea please help me.
I am also attaching the log file of jboss server.


Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Going by the initial context properties, you are using JBoss Application Server.

calculator = (CalculatorBeanRemote)ctx.lookup(CalculatorBeanRemote.class.getName());

The jndi name you are using here, is incorrect. Follow the steps mentioned here and find out the jndi-name of the remote interface for your bean. Then use that jndiname to lookup the bean. By default, in JBoss if you are deploying the EJB in a jar, the jndi-name is EJBName/remote (for remote interface) and EJBName/local (for local interface).

[My Blog] [JavaRanch Journal]
Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
Thanks a lot Jaikiran.
I needed to use the JNDI name like

where CalculatorBeanEAR is my EAR file name.

Regards to you.

I agree. Here's the link: http://aspose.com/file-tools
subject: Error:CalculatorBeanRemote not bound
It's not a secret anymore!