This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes CommunicationException ..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "CommunicationException ....." Watch "CommunicationException ....." New topic
Author

CommunicationException .....

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi all.
I want to access the active directory of WinXP.
I have the following account in my system :
from computer managment , users section :
Name: JohnTodd
Full Name: CN=johntodd
(I am inside the Adminstrators group)
inside the application , I wrote :

and when runing my application, I got the following exception :
javax.naming.CommunicationException : localhost:389 [root exception is java.net.ConnectException :
Connection refused : connect]
why I got this exception ?
is there something wrong in the url ??
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

I don't know anything specifically about LDAP or AD, but th exception says pretty clearly that there's nothing listening on port 389 on the local machine. Is there supposed to be? Does netstat show it? Can you telnet to that port?

You're probably supposed to connect to a server machine, not to the local host.


[Jess in Action][AskingGoodQuestions]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

... or a funny firewall protecting your system...


http://home.arcor.de/hirnstrom/bewerbung
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

I am using my pc, so its a localhost there is no firewalls at all.
 
GeeCON Prague 2014
 
subject: CommunicationException .....