[Logo] JCVSForum - Community Support For JCVS Users and Developers
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
NullPointerException while checking out project  XML
Forum Index » JCVS Developers
Author Message

Joined: 15/09/2004 16:26:54
Messages: 2


I am using jCVS-5.2.2

When I try to checkout project, I am getting following exception

at com.ice.cvsc.CVSProject.processResponseItem(CVSProject.java:1995)
at com.ice.cvsc.CVSProject.handleResponseItem(CVSProject.java:1610)
at com.ice.cvsc.CVSClient.processResponseItem(CVSClient.java:1669)
at com.ice.cvsc.CVSClient.readAndParseResponse(CVSClient.java:1821)
at com.ice.cvsc.CVSClient.processCVSRequest(CVSClient.java:1539)
at com.ice.cvsc.CVSClient.processCVSRequest(CVSClient.java:1052)
at com.ecredit.cvs.jcvs.JCVSTest.testCheckout(JCVSTest.java:423)
at com.ecredit.cvs.jcvs.JCVSTest.main(JCVSTest.java:453)

Looking at previous posting, I noticed that there has been change in APIs.
API cvsProject.setProjectDef( cvsProjectDef ); is no more available. Any help
is appreciated

Is there any other API that need to be called before trying to execute
checkout command ?

Code looks as follows

localRootDirectory = new File( localDirectory );
request = new CVSRequest();

arguments = new CVSArgumentVector();

//create client
client = new CVSClient( hostname, CVS_PORT);
log( "Client created");

project = new CVSProject( client );
log( "Project created");

project.setUserName( CVS_USER );
project.setTempDirectory( TEMP_DIR );
project.setRepository( repository );
project.setRootDirectory( rootDirectory );
project.setLocalRootDirectory( localRootDirectory.getPath() );

project.setPServer( true );
project.setConnectionPort( CVS_PORT );
project.setConnectionMethod( CVSRequest.METHOD_INETD );

project.setServerCommand("(not applicable)");

project.setAllowsGzipFileMode( false );

scrambled = CVSScramble.scramblePassword ( new String( CVS_PWD ), 'A' );
project.setPassword( scrambled );
log( "password " + scrambled );

project.establishRootEntry( CVS_REPOSITORY );
log( "root entry set to " + CVS_REPOSITORY );

project.openProject(localRootDirectory );
log( "Opened project at local directory " + localRootDirectory.getPath() );

request.setPServer( true );
request.setUserName( CVS_USER);
request.setPassword( project.getPassword());

request.setConnectionMethod( CVSRequest.METHOD_INETD );
log( "Connection method set to " + CVSRequest.METHOD_INETD );

request.setServerCommand( project.getServerCommand());
request.setRshProcess( project.getRshProcess());

request.setPort( cvsPort );
log( "Port set to " + cvsPort);

request.setHostName( hostname );
log( "host set to " + hostname );

request.setRepository( CVS_MODULE );
log( "request repository set to " + repository );

request.setLocalDirectory( localRootDirectory.getPath() );
log( "request local directory set to " + localRootDirectory.getPath() );

request.setRootDirectory( rootDirectory );
log( "request root directory set to " + rootDirectory );

request.setRootRepository( rootDirectory );
log( "request root Repository set to " + rootDirectory );

request.setSetVariables( project.getSetVariables());
log( "request setSetVariables set to " + project.getSetVariables() );


request.sendModule = false;

request.sendArguments = true;

request.sendEntries = false;
request.handleUpdated = true;
request.allowOverWrites = true;
request.queueResponse = false;
request.responseHandler = project;
request.includeNotifies = false;

request.handleEntries = true;

request.traceRequest = true;
request.traceResponse = true;
request.traceTCPData = true;
request.traceProcessing = true;
log( "request trace set to true" );

//request.displayReponse = true;

request.allowGzipFileMode = project.allowsGzipFileMode();
//request.setGzipStreamLevel( project.getGzipStreamLevel());

request.setEntries(cvsEntries );

//append module name to list of arguments
arguments.appendArgument( repository );

log( "request arguments set " + arguments.toString());

log( "Request is " + request.toString());

response = client.processCVSRequest( request );
log( "Executed command " + arguments.toString());
log( "Response " + response.getDisplayResults());

project.processCVSResponse(request, response);
log( "Processed cvs response " );

log( "Response " + response.getDisplayResults());



Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok

Off the top of my head, I would guess that you are not setting the
CVSUserInterface field that is used by the code to provide processing feedback.

My code does not match your line numbers, as I have changed it recently. If you
could send me the few lines involved in the exception from your code, I would be
able to confirm this for you.
[Email] [WWW]
Forum Index » JCVS Developers
Go to:   
Powered by JForum 2.1.9 © JForum Team