my dog learned polymorphism*
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
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: 15957
    
  19

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: 9937
    
159

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]
 
Consider Paul's rocket mass heater.
 
subject: comp not bound exception
 
Similar Threads
netbeans 5.5 + Jboss 4.0.4 + EJB 3.0
EJB 2.1 with JBOSS - EJB lookup from JNDI failing with NameNotFoundException bean name not bound
Exception in thread "main" javax.naming.NameNotFoundException: Greeter not bound
Problem with this example
can't find data source: java:/OracleDS