Internal Error when executing vaultcheckin NAnt plugin

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
activa
Posts: 16
Joined: Fri Feb 09, 2007 4:53 am

Internal Error when executing vaultcheckin NAnt plugin

Post by activa » Mon Feb 12, 2007 11:50 am

I am getting the followin error when trying to run the vaultcheckin task from NAnt:

Code: Select all

Internal Error: System.NullReferenceException
Object reference not set to an instance of an object.

   at NAnt.Contrib.Tasks.SourceGearVault.vaultcheckin.CheckInFile(String fileName)
   at NAnt.Contrib.Tasks.SourceGearVault.vaultcheckin.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()
In the build file, I have the following:

Code: Select all

<vaultcheckin url="http://192.168.1.10" 
                username="xxx" 
                password="xxx" 
                repository="Activa" 
                path="$/Activa/Lib.NET/2.0/Activa.CoolStorage/VersionInfo.cs" 
                diskfile="C:\CCDev\CoolStorage.NET\VersionInfo.cs" />
I am using the latest NAnt version (0.85)

"Internal error" is pretty vague :(

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Feb 12, 2007 1:46 pm

There are a couple of different options in tracking this down:

1) How are you launching Nant? From a console while you are logged in?

2) Is C:\CCDev\CoolStorage.NET the working folder for user the user specified in the Nant task? If so, have you tried the task without the use of the diskfile attribute?
Jeff Clausius
SourceGear

activa
Posts: 16
Joined: Fri Feb 09, 2007 4:53 am

Post by activa » Mon Feb 12, 2007 1:54 pm

jclausius wrote:There are a couple of different options in tracking this down:

1) How are you launching Nant? From a console while you are logged in?

2) Is C:\CCDev\CoolStorage.NET the working folder for user the user specified in the Nant task? If so, have you tried the task without the use of the diskfile attribute?
1) NAnt is called from CC.NET, but the same error occurs when I launch NAnt from the console (logged in as Administrator)

2) I have tried setting the working folder using the Vault GUI Client. I also tried removing the diskfile attribute, but I always get the same error.

I should mention that I am not using CheckIn/CheckOut, but Edit/Merge/Commit

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Feb 12, 2007 3:20 pm

I don't really have an answer for this obscure error.

There are basically two options:

1) Download / build / use the VaultNant Tasks from vaultpub.sourcegear.com. Any errors you get with a stack trace could help resolve the issue.

2) Switch your builds to use the Vault Command Line for the operations.

Let me know how you would like to proceed.
Jeff Clausius
SourceGear

activa
Posts: 16
Joined: Fri Feb 09, 2007 4:53 am

Post by activa » Mon Feb 12, 2007 4:03 pm

jclausius wrote:I don't really have an answer for this obscure error.

There are basically two options:

1) Download / build / use the VaultNant Tasks from vaultpub.sourcegear.com. Any errors you get with a stack trace could help resolve the issue.

2) Switch your builds to use the Vault Command Line for the operations.

Let me know how you would like to proceed.
Well, I worked around it by removing the diskfile attribute, and setting the working folder before getting the source code from Vault:

Code: Select all

	<exec workingdir="${CCNetWorkingDirectory}" program="C:\Program Files\SourceGear\Vault Client\vault.exe">
		<arg line="setworkingfolder $/Activa/Lib.NET/2.0/Activa.CoolStorage "${CCNetWorkingDirectory}" -user xxx -password xxx -host 192.168.1.10 -repository "Activa"" />
	</exec>
Now that this is working, I have a very strange error in one of my other projects:

Code: Select all

Build Error: NAnt.Core.BuildException
Get returned 1590: The operation was successful and requires a download.

   at NAnt.Contrib.Tasks.SourceGearVault.vaultgetfile.GetFile(String fileName)
   at NAnt.Contrib.Tasks.SourceGearVault.vaultgetfile.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()
As far as I can tell, the get operation was successful, but I'm not sure. What's strange is that the error appears exactly 30 seconds after the get operation was started.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Feb 12, 2007 4:10 pm

If it is always a 60 second value, then that says there is some timeout that is kicking in. See if you can find/fix that problem.

Another option is to also use the vault.exe command line to do the Get.
Jeff Clausius
SourceGear

activa
Posts: 16
Joined: Fri Feb 09, 2007 4:53 am

Post by activa » Mon Feb 12, 2007 4:26 pm

jclausius wrote:If it is always a 60 second value, then that says there is some timeout that is kicking in. See if you can find/fix that problem.

Another option is to also use the vault.exe command line to do the Get.
The 60 second difference was a coincidence. In the meantime, the error appeared 2 more times (sometimes it works though) after 27 seconds and 42 seconds.

What is error 1590 ?

Although using the command line would be an option, it's not something I want to do right now. It is more convenient to use NAnt tasks. After all, SourceGear developed the nant tasks , so I assume they should work, right?

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Feb 12, 2007 4:38 pm

activa wrote:What is error 1590?
This means the Vault client requested a file, and the server successfully executed a security and version check against your last baseline. The result is a "success" state, and that the client should go ahead and download of the file's delta.

The question is, why is the Vault NAnt task not downloading the file.

activa wrote:After all, SourceGear developed the nant tasks , so I assume they should work, right?
The Vault NAnt tasks started in the open source community, and is distributed with an open source license. We can try to help you find the solution to your problems with this.

Perhaps the easiest thing to do is log into vaultpub.sourcegear.com (user guest / pwd guest), get and build the tasks. This way we could better trouble shoot the real cause of the problem.
Jeff Clausius
SourceGear

gkn
Posts: 7
Joined: Wed Jun 14, 2006 4:45 pm

Post by gkn » Mon Mar 19, 2007 2:42 pm

Just from preliminary investigation, it appears that in the Vault Nant tasks source, that there are tests to see whether the response for getting file/folder is "Success". However, there are several other response status which appear to be valid. Can someone verify that VaultLib.VaultStatusCode.SuccessRequireFileDownload is a positive response?

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Jun 13, 2007 12:06 pm

The status code means the server has the file and delta available, and the client should go to the next phase and actually download the file's deltas.
Jeff Clausius
SourceGear

Locked