Vault Shadow Folder: [System.NullReferenceException...

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
thomas62j5
Posts: 71
Joined: Tue Aug 17, 2004 7:59 pm
Location: West Coast, USA

Vault Shadow Folder: [System.NullReferenceException...

Post by thomas62j5 » Tue Aug 03, 2010 11:05 am

Since upgrading from Vault 4.x to 5.0.4, shadowing no longer seems to work. When looking at the vault shadow folder log, We are seeing a ton of these errors:

8/2/2010 6:06:02 PM <generic>: [<No Name>:2768] Vault Shadow Folder encountered a problem: [System.NullReferenceException: Object reference not set to an instance of an object.
at VaultShadowFolder.VaultShadowFolderRepository.VaultShadowFolderRepositoryProc()]Object reference not set to an instance of an object.
at VaultShadowFolder.VaultShadowFolderRepository.VaultShadowFolderRepositoryProc()

I'm wondering if it's a permissions problem, since every time I go to upgrade Vault, it re-asks me what kind of user do I want to run Vault as, and I can never remember what we chose previously. (WHY CAN'T VAULT UPGRADE PROCESS FIGURE THIS OUT? I asked for this feature back in 2005 and said it would be added to the feature request list....)

Anyway, I'd love to hear if there are any other things I should be looking into.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Vault Shadow Folder: [System.NullReferenceException...

Post by lbauer » Tue Aug 03, 2010 11:55 am

What specifically isn't working? Are shadow folders not being populated at all? Or are files not being updated?

Are you shadowing to the Vault Server machine or a different machine?

Are there any errors in the Vault Server log that correspond to the failure?

Can you access the Vault Shadow Folder settings in the Admin Web Client under Source Control Repositories->(Repository name)->Shadow Folders. or do you get an error when trying to access that link?
Linda Bauer
SourceGear
Technical Support Manager

thomas62j5
Posts: 71
Joined: Tue Aug 17, 2004 7:59 pm
Location: West Coast, USA

Re: Vault Shadow Folder: [System.NullReferenceException...

Post by thomas62j5 » Tue Aug 03, 2010 1:12 pm

Vault is not updating files on disk that are updated in Vault. We are shadowing to the local machine (the vault server), and to a network machine.

If I go to the .asmx plugin URL, it loads OK and shows the available calls (I'm hitting http://ourserver/VaultShadowFolder/Vaul ... rvice.asmx)

If I go into the shadow folder config for the repository on the web admin, it loads OK and shows me all the configured shadow folders.

I've also run sysinternals procmon during a check-in, and I don't see any access denied errors.

There is the error I posted in the shadow service log, and no corresponding errors in the sgvault.log. Here's an example snippet from that log (in debug mode) at the time of my latest check-in attempt (see attached).

And the corresponding blip in vaultshadowfolderservice.txt:

8/3/2010 11:55:42 AM <generic>: [<No Name>:6976] Vault Shadow Folder encountered a problem: [System.NullReferenceException: Object reference not set to an instance of an object.
at VaultShadowFolder.VaultShadowFolderRepository.VaultShadowFolderRepositoryProc()]Object reference not set to an instance of an object.
at VaultShadowFolder.VaultShadowFolderRepository.VaultShadowFolderRepositoryProc()

thomas62j5
Posts: 71
Joined: Tue Aug 17, 2004 7:59 pm
Location: West Coast, USA

SOLVED!

Post by thomas62j5 » Fri Aug 06, 2010 11:07 am

lbauer worked with me via email. After looking at all the usual suspects: permissions issues, outdated cache folder, etc... the problem turned out to be related to a change we made to one of our repository folders. Inside this repository, we had a folder named d_geoip, and a shadow configuration was setup mapping $/d_geoip to d:\geoip on disk.

We renamed that repository folder to $/c_geoip, and never updated the underlying shadow folder configuration. For some reason, this would result in a System.NullReferenceException in the shadow log file whenever a check-in was performed, and only on SOME folders in the repository.

Actually, now that I think about the order, it makes sense. We have another repos folder named $/d_cgibin. If we checked into that one, things worked. If we checked into anything below d_geoip (alphabetically), it failed. So my guess is the shadow process was going down the list alphabetically, and dying on d_geoip folder with that null exception.

The specific error that clued lbauer into this was in the vaultshadowfolderservice.txt:

"Although a shadow folder has a working folder assignment, the Repository Path $/d_geoip was not found in the current tree for [Repository Name]."

Hope this helps someone in the future.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Vault Shadow Folder: [System.NullReferenceException...

Post by Beth » Mon Aug 09, 2010 7:03 am

Thanks for the update. Other customers may find it useful.
Beth Kieler
SourceGear Technical Support

Post Reply