Re: Problem with CheckoutCommand

J Z <[email protected]> Wed, 11 Aug 2004 09:31:08 -0700 (PDT)
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
That resolved the issue!  Thanks Benoit!


--- Benoit Maisonny <[email protected]> wrote:

> Hi,
> 
> The warning seems to be "normal": javacvs must mean
> "do as I say, not as 
> I do", because it itself re-uses an open connection
> during execution of 
> certain cvs sub-commands. I wish a javacvs developer
> would comment on 
> this, though (but seems like they haven't been
> around for a while).
> 
> As for your NullPointerException, you need to give
> your CVSRoot to 
> GlobalOptions when you create it. There is not much
> doc, but this is in 
> there:
>
http://javacvs.netbeans.org/library/GettingStarted.html
> 
> GlobalOptions globalOptions = new GlobalOptions();
> globalOptions.setCVSRoot(getCVSRoot());  // or
> whatever way you have to get it
> client.executeCommand(checkoutcommand,
> globalOptions);
> 
> 
> 
> Cheers,
> Benoit
> 
> 
> 
> 
> J Z wrote:
> 
> >All,
> >
> >I'm getting this warning and this error message
> when
> >running the checkout command.
> >
> >
> >WARNING TO DEVELOPERS:
> >Please be warned that attempting to reuse one open
> >connection for more commands is not supported by
> cvs
> >servers very well.
> >You are advised to open a new Connection each time.
> >If you still want to proceed, please do:
>
>System.setProperty("javacvs.multiple_commands_warning",
> >"false")
> >That will disable this message.
> >
> >
> >java.lang.NullPointerException
> >	at java.io.Writer.write(Unknown Source)
> >	at
>
>org.netbeans.lib.cvsclient.admin.StandardAdminHandler.updateAdminData(StandardAdminHandler.java:59)
> >	at
>
>org.netbeans.lib.cvsclient.Client.updateAdminData(Client.java:591)
> >	at
>
>org.netbeans.lib.cvsclient.response.ClearStickyResponse.process(ClearStickyResponse.java:39)
> >	at
>
>org.netbeans.lib.cvsclient.Client.handleResponse(Client.java:485)
> >	at
>
>org.netbeans.lib.cvsclient.Client.processRequests(Client.java:439)
> >	at
>
>org.netbeans.lib.cvsclient.command.checkout.CheckoutCommand.postExpansionExecute(CheckoutCommand.java:375)DONE
> >
> >	at
>
>org.netbeans.lib.cvsclient.command.checkout.CheckoutCommand.execute(CheckoutCommand.java:283)
> >	at
>
>org.netbeans.lib.cvsclient.Client.executeCommand(Client.java:533)
> >
> ><local client code>
> >
> >
> >My end goal is to check out a complete module into
> an
> >empty directory.
> >
> >Here is a rough look at what code it takes me to
> >duplicate it.
> >
> >CVSConnection is a PServerConnection with those
> >variables set at the constructor level, and
> >openconnection opens it and returns the Connection
> >class.
> >
> >		client = new Client(new
> >CVSConnection("cvsserver.name.com", "username",
> >"password", "/cvs").openConnection(), new
> >StandardAdminHandler());
> >
> >		client.setLocalPath("d:/cvstester");
> >		
> >		checkoutcommand = new CheckoutCommand(true,
> module);
> >		checkoutcommand.setResetStickyOnes(true);
> >		//checkoutcommand.setPipeToOutput(true);
> >		
> >		try
> >		{
> >			client.executeCommand(checkoutcommand, new
> >GlobalOptions());
> >		}
> >		catch (Exception e)
> >		{
> >			e.printStackTrace();
> >		}
> >
> >
> >
> >The catch will contain the exception, and it
> happens
> >when it gets done checking out the first directory
> >(and files contained in it).
> >
> >I can recursively call it over and over upon error
> and
> >it works fine (checks out all files correctly in
> the
> >end), but throws an exception each directory.  Once
> a
> >directory is checked out, it can handle it fine.
> >
> >If I uncomment the setPipeToOutput line, it can
> dump
> >all of the information for the whole module to a
> >BasicListener just fine, but it wont check any out
> (of
> >course).
> >
> >I'm not able to find this listed anywhere so I
> believe
> >it is something simple I'm just not doing.
> >
> >
> >	
> >		
> >__________________________________
> >Do you Yahoo!?
> >New and Improved Yahoo! Mail - 100MB free storage!
> >http://promotions.yahoo.com/new_mail 
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> [email protected]
> >For additional commands, e-mail:
> [email protected]
> >  
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [email protected]
> For additional commands, e-mail:
> [email protected]
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail