This means that you have not imported the server's certificate into your client application. You are using a
java program that acts as a client, kind of like a web browser. If you were trying this in a web browser, you would get a pop-up warning you that the certificate is unknown or self-signed and a chance to import it. You have to make this happen yourself with your java client. This is done with java keytool command.
I recently did one something like:
keytool -import -v -trustcacerts -alias blahblah -keystore /usr/java/jdk1.6.0/jre/lib/security/cacerts -file ./my-ad.cert