Import/Export error

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

Moderator: SourceGear

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Import/Export error

Post by AGBrown » Mon Mar 24, 2008 1:01 pm

I have a problem with vault export/import on 3.5.2 (client and server) running on windows xp sp2. I am exporting the root folder of a repository, and the export fails consistently on the same transaction number each time with the error:

An exception occurred processing a transaction for the folder. The export cannot continue. Object reference not set to an instance of an object.

The export fails regardless including or excluding deleted items.

Any ideas?

Andy
Andy Brown
<a href="http://www.k2nenergy.com/index.htm" title="See how K2n can reduce your energy consumption and costs">K2n: Energy Monitoring Solutions</a>

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

Post by Beth » Mon Mar 24, 2008 1:46 pm

Do you have any obliterates in that repository? (Obliterates currently are irretrievable by exports.)

What happens if you try to export/import a smaller section?

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Mon Mar 24, 2008 1:50 pm

I'm going into the folder tree level by level, so I can pin it down to a particular folder. I've got the 1 of the 3 folders in the first level that does it, so now I'm finding which of its 2 subfolders is the issue.

If I did have obliterates; how would I tell - through the history? And if so then how do I fix them so the export can work?

Andy
Andy Brown
<a href="http://www.k2nenergy.com/index.htm" title="See how K2n can reduce your energy consumption and costs">K2n: Energy Monitoring Solutions</a>

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Mon Mar 24, 2008 1:56 pm

The history lists a single obliterate in the $\maintenance folder, but this folder exports fine. The folder that fails is in the $\master folder. I'm still drilling into it (slowly) level by level. The master folder lists 3288 transactions, and doesn't fail until the 1700th (ish) one of those.
Andy Brown
<a href="http://www.k2nenergy.com/index.htm" title="See how K2n can reduce your energy consumption and costs">K2n: Energy Monitoring Solutions</a>

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Mon Mar 24, 2008 2:45 pm

I've run SQL Profiler and caught the last statement to run before the exception. The penultimate spgetfolderexportdelta lists the obliterated folder that I mentioned above, and the last statement only gets as far as the folder above the obliterated folder, so sure enough it looks like that obliteration is the problem.

Crazy suggestion but I'll just throw it in here ... would recreating that folder and the items inside it fix the problem (that is, folders and files with the same names?)
Andy Brown
<a href="http://www.k2nenergy.com/index.htm" title="See how K2n can reduce your energy consumption and costs">K2n: Energy Monitoring Solutions</a>

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

Post by Beth » Mon Mar 24, 2008 4:28 pm

I would expect them to have different ID numbers to them so it shouldn't be possible to fake Vault out like that. The old obliterate would still be in the history. I have this behavior logged so we can see if we can find a way around it, but that would be in some future version.

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Tue Mar 25, 2008 5:00 am

Thanks Beth,

The two executes that are relevant are:

Code: Select all

--$\Maintenance\v1.0\Application exists here - resultset shows all levels of that path and deeper into the tree
exec dbo.spgetfolderexportdelta @sessionid=N'4ztubi452isz4u3qfpzkp5r4',@repid=13,@baserevid=8180,@targetrevid=8178
--$\Maintenance\v1.0\Application obliterated by this revision - resultset stops at v1.0
exec dbo.spgetfolderexportdelta @sessionid=N'4ztubi452isz4u3qfpzkp5r4',@repid=13,@baserevid=8178,@targetrevid=8177
Naïvely I would guess that the disappearance of the Application folder in the second resultset is what is causing the "object reference" exception. Spotting that an item isn't in @targetrevid when it was in @baserevid would therefore be an (overly simplistic) indicator that it was obliterated so it could marked as such in the export, and acted upon in the import?

I'm keen to beta anything that comes out of this as I do want to be able to import this repository to my current source control database rather than have to license two vault installations on the same server for the short period of time I need this repository running.

Andy
Andy Brown
<a href="http://www.k2nenergy.com/index.htm" title="See how K2n can reduce your energy consumption and costs">K2n: Energy Monitoring Solutions</a>

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

Post by Beth » Tue Mar 25, 2008 9:27 am

Do you have anything else in that database yet? If not, one thing you can do is restore a backup of your current database to the other server and delete the repositories you don't need and then you should be left with just the one.

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Tue Mar 25, 2008 9:56 am

Unfortunately both databases have things in them, and both have obliterations in them. It looks like I will have to make do without the source control history for one of them and create only the latest version in the live database.
Andy Brown
<a href="http://www.k2nenergy.com/index.htm" title="See how K2n can reduce your energy consumption and costs">K2n: Energy Monitoring Solutions</a>

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

Post by Beth » Tue Mar 25, 2008 2:53 pm

I have gathered a few more details on this obliterate thing, and it turns out it's more specific than I originally thought. In this case, it would be much better if I could get your Vault Server Log and your ExportImport log (VaultFolderExportImport.txt in the same directory as the ExportImport tool) that line up on the problem export/import. Could you send those to me?

You can either post them here or email them to support at sourcegear.com (attn:Beth) with a link to this forum thread.

jkp*74
Posts: 147
Joined: Wed Dec 15, 2004 9:42 pm
Contact:

Post by jkp*74 » Tue Mar 25, 2008 10:11 pm

Run into this error while performing export.
Vault ver 4.1

Server log:

Code: Select all

----3/26/2008 12:00:01 PM    admin--SDD-JOEL(192.0.0.88)--SSL Disabled	VaultServiceSQL.VaultDbTreeException: An error was encountered looking up the owner of a folder or file for the source code tree.  The tree was not built. Base TreeRevision: 43493 Target TreeRevision: 38021  TreeLevel: 3 ParentObjVerID: 0 ObjID: 107901 ObjVersion: 2 Name: Drawing PinFrom: 0 ParentPathHash: 0xBAE177D61F5C16972BBE290B03692C04 PathHash: 0x373BD203589A0BE6ADE284655887E79C
   at VaultServiceSQL.VaultRepUtil.BuildTreeDelta(SqlDataReader dr, Int64 nBaseRevID, Int64 nTargetRevID, Hashtable htSharedItems)
   at VaultServiceSQL.VaultSqlSCC.GetFolderExportRepositoryDelta(VaultSqlConn conn, String strSessionID, Int32 nRepID, Int64 nBaseRevID, Int64 nTargetRevID, VaultRepositoryDelta& rep)    at VaultServiceSQL.VaultRepUtil.BuildTreeDelta(SqlDataReader dr, Int64 nBaseRevID, Int64 nTargetRevID, Hashtable htSharedItems)
   at VaultServiceSQL.VaultSqlSCC.GetFolderExportRepositoryDelta(VaultSqlConn conn, String strSessionID, Int32 nRepID, Int64 nBaseRevID, Int64 nTargetRevID, VaultRepositoryDelta& rep)
----3/26/2008 12:00:01 PM    admin--SDD-JOEL(192.0.0.88)--SSL Disabled	GetFolderExportRepositoryDelta returned: FailDBInvalidTreeRecords

Vault Import/Export Log:

Code: Select all

3/26/2008 11:29:04 AM <generic>: [<No Name>:5804] Folder Import:  ## FOLDER IMPORT END ##
3/26/2008 11:48:06 AM <generic>: [<No Name>:5804] Folder Export:  Starting export of folder $/C02-009-001 (RE-TO3P Laser Mark Handler)/Source Code/LMSApp from repository CSD Project 2006 to file C:\Documents and Settings\joel\Desktop\Train-001-001\export.vfe.  Deleted Items: True.  Comment: 
3/26/2008 11:48:06 AM <generic>: [<No Name>:5804] Folder Export:  ## FOLDER EXPORT START ##
3/26/2008 11:48:06 AM <generic>: [<No Name>:5804] Folder Export:  Initializing Export.
3/26/2008 11:48:06 AM <generic>: [<No Name>:5804] Folder Export:  Opening Export File C:\Documents and Settings\joel\Desktop\Train-001-001\export.vfe
3/26/2008 11:48:06 AM <generic>: [<No Name>:5804] Folder Export:   Initialized export for Repository CSD Project 2006 (ID 67146577-7AFC-40EC-A419-C1EC3AA90FFA), TX temp File name C:\Documents and Settings\joel\Local Settings\Temp\tmpB57.tmp, Label tmp file name C:\Documents and Settings\joel\Local Settings\Temp\tmpB58.tmp
3/26/2008 11:48:06 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving Deleted Object List for $/C02-009-001 (RE-TO3P Laser Mark Handler)/Source Code/LMSApp (ID: 112745)
3/26/2008 11:48:06 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving Folder Transaction Information for $/C02-009-001 (RE-TO3P Laser Mark Handler)/Source Code/LMSApp (ID: 112745)
3/26/2008 11:48:20 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving Labels for $/C02-009-001 (RE-TO3P Laser Mark Handler)/Source Code/LMSApp (ID: 112745)
3/26/2008 11:48:20 AM <generic>: [<No Name>:5804] Folder Export:  Begin Folder Label Data for $/C02-009-001 (RE-TO3P Laser Mark Handler)/Source Code/LMSApp (ID: 112745)
3/26/2008 11:48:20 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving Label Data for $/C02-009-001 (RE-TO3P Laser Mark Handler)/Source Code/LMSApp (ID: 112745)
3/26/2008 11:48:20 AM <generic>: [<No Name>:5804] Folder Export:  Finished Retrieving Label Data for $/C02-009-001 (RE-TO3P Laser Mark Handler)/Source Code/LMSApp (ID: 112745)
3/26/2008 11:48:20 AM <generic>: [<No Name>:5804] Folder Export:  Synchronizing tree cache with last known transaction (TxID: 48231)
3/26/2008 11:48:44 AM <generic>: [<No Name>:5804] Folder Export:  Applied Repository Delta - base revision 58361 Target Revision - 48231
3/26/2008 11:48:44 AM <generic>: [<No Name>:5804] Folder Export:  Starting the Transaction Processing.
3/26/2008 11:48:44 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving transaction for joel on 9/3/2007 3:57:08 PM TxID: 48231.
3/26/2008 11:48:53 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving transaction for joel on 8/30/2007 5:46:15 PM TxID: 48146.
3/26/2008 11:49:03 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving transaction for joel on 8/30/2007 5:09:44 PM TxID: 48144.
3/26/2008 11:49:11 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving transaction for joel on 8/30/2007 1:45:34 PM TxID: 48140.
3/26/2008 11:49:22 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving transaction for joel on 8/29/2007 5:54:42 PM TxID: 48106.
3/26/2008 11:49:33 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving transaction for joel on 8/20/2007 8:24:16 PM TxID: 47394.
3/26/2008 11:49:53 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving transaction for phteoh on 5/31/2007 2:48:19 PM TxID: 43493.
3/26/2008 11:50:11 AM <generic>: [<No Name>:5804] Folder Export:  Retrieving transaction for phteoh on 3/26/2007 7:52:42 AM TxID: 41058.
3/26/2008 11:50:24 AM <generic>: [<No Name>:10000]  [System.Web.Services.Protocols.SoapException: 1108 : FailDBInvalidTreeRecords
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.AdminService.VaultAdminService.GetRepositoryDeltaForFolderExport(Int32 nRepID, Int64 nBaseRevision, Int64 nTargetRevision, VaultRepositoryDelta& rd)
   at VaultClientNetLib.VaultConnection.GetRepositoryDeltaForFolderExport(Int32 nRepID, Int64 nSrcRevision, Int64 nDestRevision, VaultRepositoryDelta& rd)
   at VaultClientOperationsLib.ClientInstance.GetRepositoryDeltaForFolderExport(Int32 repid, Int64 srcrevision, Int64 destrevision, VaultRepositoryDelta& rd)
   at VaultFolderExportImport.ExportWorkerThread.ProcessTransaction(String strProcessMsgType, Int64 nTxID, Int64 nPrevTxID)]1108 : FailDBInvalidTreeRecords
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VaultClientNetLib.AdminService.VaultAdminService.GetRepositoryDeltaForFolderExport(Int32 nRepID, Int64 nBaseRevision, Int64 nTargetRevision, VaultRepositoryDelta& rd)
   at VaultClientNetLib.VaultConnection.GetRepositoryDeltaForFolderExport(Int32 nRepID, Int64 nSrcRevision, Int64 nDestRevision, VaultRepositoryDelta& rd)
   at VaultClientOperationsLib.ClientInstance.GetRepositoryDeltaForFolderExport(Int32 repid, Int64 srcrevision, Int64 destrevision, VaultRepositoryDelta& rd)
   at VaultFolderExportImport.ExportWorkerThread.ProcessTransaction(String strProcessMsgType, Int64 nTxID, Int64 nPrevTxID)

3/26/2008 11:53:15 AM <generic>: [<No Name>:5804] Folder Export:  Closing the Export Dialog with Dialog Result: Abort
3/26/2008 11:53:15 AM <generic>: [<No Name>:5804] Folder Export:  ## FOLDER EXPORT END ##
3/26/2008 11:53:15 AM <generic>: [<No Name>:10000] Folder Export:  An exception occurred in ProcessResults() for Command: ProcessTransactionCannot access a disposed object.
Object name: 'frmExport'.    at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at VaultFolderExportImport.frmExport.ProcessResults(ExportCommand ec)  [System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'frmExport'.
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at VaultFolderExportImport.frmExport.ProcessResults(ExportCommand ec)]Cannot access a disposed object.
Object name: 'frmExport'.
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at VaultFolderExportImport.frmExport.ProcessResults(ExportCommand ec)
Attachments
Folder Export Error.jpg
Folder Export Error
Folder Export Error.jpg (50.77 KiB) Viewed 6916 times
Joel
Micro Modular System
http://www.mmsis.com

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Wed Mar 26, 2008 4:41 am

Looks like someone hijacked my thread; those logs above aren't mine.

The bad news is that the vaultfolderexportimport.txt log has basically nothing in it. Is there something I should change to get that to be different?

Code: Select all

21/01/2007 22:43:05 <generic>: [<No Name>:5528] VaultFolderExportImport, Version=3.5.1.4786, Culture=neutral, PublicKeyToken=null
24/03/2008 12:51:09 <generic>: [<No Name>:3972] VaultFolderExportImport, Version=3.5.2.5087, Culture=neutral, PublicKeyToken=null
24/03/2008 14:11:21 <generic>: [<No Name>:6100] VaultFolderExportImport, Version=3.5.2.5087, Culture=neutral, PublicKeyToken=null
I'm re-running the import now so I can get a fresh log for it.
Andy Brown
<a href="http://www.k2nenergy.com/index.htm" title="See how K2n can reduce your energy consumption and costs">K2n: Energy Monitoring Solutions</a>

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Wed Mar 26, 2008 8:03 am

I've just run the export against the base folder, the above SQL was from a folder deeper in the tree. The final set of SQL this time is:

Code: Select all

exec dbo.spgetfolderexportdelta @sessionid=N'nfh3wv55ylgelm455z5x4rab',@repid=13,@baserevid=8179,@targetrevid=8178

exec dbo.spgetlatestrepositoryinfo @repid=13

exec dbo.spgettxitems @repid=13,@txid=8178

exec dbo.spgetfolderexportdelta @sessionid=N'nfh3wv55ylgelm455z5x4rab',@repid=13,@baserevid=8178,@targetrevid=8177
(the SQL above here missed out the two middle items). The penultimate spgetfolderexportdelta is different to before, and doesn't include the Application folder in its results, though the error is the same and final spgetfolderexportdelta is the same.

I have emailed the sgvault log as you requested, but it doesn't say much that I can tell.

Andy
Andy Brown
<a href="http://www.k2nenergy.com/index.htm" title="See how K2n can reduce your energy consumption and costs">K2n: Energy Monitoring Solutions</a>

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

Post by Beth » Wed Mar 26, 2008 2:03 pm

Thanks Andy. We'll switch this off line.

jkp*74: Can you send an email to support at sourcegear.com as well with your export information? I 'll need the Vault server log and the export/import log. That way I won't get your issue mixed up with Andy's.

jkp*74
Posts: 147
Joined: Wed Dec 15, 2004 9:42 pm
Contact:

Post by jkp*74 » Thu Mar 27, 2008 12:09 am

Hi AGBrown, sorry for the 'hijacking'
Hi Beth, alright.
Joel
Micro Modular System
http://www.mmsis.com

Post Reply