• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

comp not bound exception

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Saloon Keeper
Posts: 21941
149
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you wanted "java:comp", not "java.comp".
 
krishna prasad gunasekaran
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic