File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes comp not bound exception 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 "comp not bound exception" Watch "comp not bound exception" New topic

comp not bound exception

krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
context.listBindings("java.comp") throws the following exception

when i invoked listXML() method in service JNDIView in jmx-console, it displayed the following, which proved the presence of java:comp.

then how listBindings threw that exception?

have a great day,
krishna prasad
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16588

I think you wanted "java:comp", not "java.comp".

Customer surveys are for companies who didn't pay proper attention to begin with.
krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
i mistyped it. i meant to say "java:comp" only. i configured my jboss in eclipse. i start my jboss from eclipse. then why is it not bound.
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10417

The java:comp/env namespace is per component. What this means is, this namespace and the objects bound in this namespace are accessible only to the component to which this java:comp/env namespace belongs to.

at javax.naming.InitialContext.listBindings(
at com.test.EntityTest.main(

Going by this exception stacktrace, you are trying to lookup the java:comp namespace from a standalone java client, which does not have java:comp namespace of its own

[My Blog] [JavaRanch Journal]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: comp not bound exception