• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error:CalculatorBeanRemote not bound

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Regards,
Khushwinder

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Jaikiran.
I needed to use the JNDI name like



where CalculatorBeanEAR is my EAR file name.

Regards to you.


 
reply
    Bookmark Topic Watch Topic
  • New Topic