• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

comp not bound exception

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic