This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

comp not bound exception

 
krishna prasad gunasekaran
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?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE 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.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic