Search This Blog

Wednesday, August 23, 2006

Cube Processing Runtime Error

I has some bad days with TFS.
After 2 weeks of work on the new server I found that the reports are not generated and you can see only old reports.
I regenerated the warehouse (setupwarehouse.exe) and running the adapters stopped working.
I read the: Warehouse Troubleshooting Guide but had no success. After going deeper I found that the problem was in the SQL Server Analysis trying to process the TfsWarehouse database. The errors I found in the event viewer and while manualy running it were:

Cube processing runtime error: \r\nMicrosoft.AnalysisServices.OperationException: The member '[8/22/2006]' was not found in the cube when the string, [Date].[Date].[Date].[8/22/2006], was parsed.
The END SCOPE statement does not match the opening SCOPE statement.
MdxScript(Team System) (66, 1) The END SCOPE statement does not match the opening SCOPE statement.

I read on another blog about a problem while moving from one server to another and installing SQL Server with a different collation (Scotty.Net). His post gave me a good direction but I got into some problems while trying to change the collation. Anyway, I found myself reinstalling the Team Foundation server and with no solution for the problem.

The big advance came when I searched for: "The END SCOPE statement does not match the opening SCOPE statement". I found an MSDN forum post with the same problem I had ( I understood that the problem was with a table named: dbo.Today under the TfsWarehouse database. It's a single row table which contains dates that are used while running the adapters. Anyway, I've checked the differences of the values with the old server database and found that the values are related to the regional settings of the machine. I've changed them manually and the process finshed successfuly. After a while the row was regenerated and the problem occured again.

The solution to this problem was to change the regional settings of the tfsservice user to the one in the previous installation. I logged in to the server with that user and changed it.

Wednesday, August 09, 2006

"The path xxx is already mapped in workspace xxx."

I was struggling with a problem I had when using TFS API I tried to map a file using:
public void Map(string serverPath, string localPath);
I was getting an exception telling me that the file was already mapped in another workspace:
"The path {File Path} is already mapped in workspace {Workspace Name}."
This workspace was deleted beofre.
With the help of friend of mine I found out that TFS save workspace info under the user local settings dir. We found a file named: VersionControl.config under {User Documents and Settings dir}\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache.
This file contains all the local mapping of TFS. Probably when you use the Map method and don't use:
public void DeleteMapping(WorkingFolder mapping); before deleting the workspace the mapping information is not removed from this file which is used by TFS to check if you've alreay mapped a specific path.
To resolve this problem delete all the keys from the config file. Don't delete the file because you'll get it again from the server cache.