• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

JNDI - problem while accessing EJB using jboss

Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To access ejb from servlet follwoing code snippet has been written:
InitialContext init = new InitialContext();
Object objref = init.lookup("CDSAdminJNDI");
CDSAdminHome cdsAdminHome = (CDSAdminHome)PortableRemoteObject.narrow(objref,CDSAdminHome.class);
CDSAdmin cdsAdmin = cdsAdminBean.create();

jboss xml file is as follows:
------Start -----------------
<?xml version="1.0" encoding="UTF-8"?>

While accessing this Bean..I get following exception on jboss console:

Exception While accessing EJB: javax.naming.NameNotFoundException: CDSAdminJNDI not bound

Can Any body help where is problem?

Thanks in advance
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you check under what name space the bean was deployed...?
You could do this by starting up your jboss and navigating to the

service=JNDIView (on your JMX console http://localhost:8080/jmx-console)

Click on invoke button the java.lang.String.list(). You will see under what name space your bean was deployed.

accordingly modify your lookup.

My, my, aren't you a big fella. Here, have a tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic