Unable to open connection using PServerConnection class

Vic Rowan <[email protected]> Wed, 1 Mar 2006 17:19:33 +0000 (UTC)
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
Hi...

I am using the PSserverConnection class
(org.netbeans.lib.cvsclient.connection.PServerConnection) to connect to the CVS,
but I am getting a Null Pointer Exception when I try to open a connection using
the open method.

As per the API if there is a problem it throws either an AuthenticationException
or CommandAbortedException, but instead its throwing a Null Pointer Exception
and I cant figure out what I am doing wrong.

I am really having too much trouble using this API. I dont think there is even
an API reference publicly available to start with, but now that I have it,
courtesy somebody who took the trouble of emailing it to me, now I dont think
the API does what it says. 

Any help would be appreciated. Below is the code I am using to connect to the 
CVS.

cheers,
Vic.

PServerConnection c = null;
    try {
        c = new PServerConnection();
        c.setUserName("username");
	c.setEncodedPassword("AAd!b=?!");
	c.setHostName("ServerName");
	c.setRepository("/jdev/cvs/");
	if(c != null)
	   c.open(); // -->Exception occurs here
	else
	   System.out.println("Connection object NULL!");
	}catch (Exception ex) {
  	   ex.printStackTrace();
	   System.out.println(ex.getMessage());
	}