• Post Reply Bookmark Topic Watch Topic
  • New Topic

NotBoundException, very strange...

 
Charlie Goth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone shed some light onto why this isn't working?

This code outputs:
"list>'Server'"
"match found!"
But then the lookup throws a NotBoundException.
Thanks in advance, Charlie
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it's because you are doing a lookup on your registry. You can see the strings from the list and such as you have found with a lookup on it, but you can't actually do a lookup with it. You need to replace reg.lookup with Naming.lookup . That should fix your problem.
Please post back here and let me know that this works. This is a situation I've read about, but never actually run into myself.
Thanks,
Chris
 
Charlie Goth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, it worked.
I thought that could be a problem but dismissed it as there was a lookup method and nothing in the docs to say it doesn't work.
Thanks again, Charlie
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!