wood burning stoves 2.0*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "comp not bound exception" Watch "comp not bound exception" New topic
Author

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: 16019
    
  20

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
Marshal

Joined: Jul 20, 2005
Posts: 10067
    
163

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(InitialContext.java:418)
at com.test.EntityTest.main(EntityTest.java)


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]
 
 
subject: comp not bound exception