使用Moss的Variation功能时候遇到异常at SynchronizePeerPages()
今日做Variation,但是发现系统自带的webpart可以同步过去,我们自己的不能,检查日志,看不到特别有用的。不过按照log里所说,我们给注册表里添加了一个key heapsettings, 然后就看到了下边的详细异常:
An unhandled exception has occurred. Unable to cast object of type ABC.SharePoint.WebParts.DTLibrary' to type 'Microsoft.SharePoint.WebPartPages.WebPart'. System.InvalidCastException: Unable to cast object of type 'ABC.SharePoint.WebParts.DTLibrary' to type 'Microsoft.SharePoint.WebPartPages.WebPart'. at Microsoft.SharePoint.Publishing.PublishingPage.FixWebPartUrlsForVariation() at Microsoft.SharePoint.Publishing.Internal.DeploymentWrapper.SynchronizePeerPages(PublishingPage sourcePage, StringCollection urlsOfPagesToUpdate, VariationSettings varSettings, LongRunningOperationJob lroLogger, List`1 errors) at Microsoft.SharePoint.Publishing.Internal.DeploymentWrapper.<>c__DisplayClass1.<PropagateVariationSourcePage>b__0() at Microsoft.Sha...
08/20/2009 16:58:26.24* w3wp.exe (0x0E50) 0x1290 Windows SharePoint Services Runtime 8yr8 Exception ...rePoint.SPSecurity.CodeToRunElevatedWrapper(Object state) at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at Microsoft.SharePoint.Publishing.Internal.DeploymentWrapper.PropagateVariationSourcePage(PublishingPage variationSourcePage, Boolean alwaysCreatePages, LongRunningOperationJob lroLogger, List`1 errors) at Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.UpdateVariationsAction.UpdatePageVariationsLro.UpdatePageVariations() at...
08/20/2009 16:58:26.24* w3wp.exe (0x0E50) 0x1290 Windows SharePoint Services Runtime 8yr8 Exception ... Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.UpdateVariationsAction.UpdatePageVariationsLro.DoWork() at Microsoft.SharePoint.Publishing.Internal.LongRunningOperationJob.<ThreadEntryPoint>b__11() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) at Microsoft.Office.Server.Diagnostics.ULS.SendWatsonOnExceptionTag(ULSTagID tagID, ULSCat categoryID, String output, Boolean fRethrowException, TryBlock tryBlock, CatchBlock catchBlock, FinallyBlock finallyBlock) at Microsoft.SharePoint.Publishing.Internal.LongRunningOperationJob.<ThreadEntryPoint>b__f() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFi...
08/20/2009 16:58:26.24* w3wp.exe (0x0E50) 0x1290 Windows SharePoint Services Runtime 8yr8 Exception ...lter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) at Microsoft.Office.Server.Diagnostics.ULS.SendWatsonOnExceptionTag(ULSTagID tagID, ULSCat categoryID, String output, Boolean fRethrowException, TryBlock tryBlock, CatchBlock catchBlock, FinallyBlock finallyBlock) at Microsoft.SharePoint.Publishing.Internal.LongRunningOperationJob.ThreadEntryPoint() at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.T...
08/20/2009 16:58:26.24* w3wp.exe (0x0E50) 0x1290 Windows SharePoint Services Runtime 8yr8 Exception ...hreadStart()
这次的异常信息就很明显了,是因为我们自己的webpart使用的基类是webcontrol中的webpart,而不是sharepoint中的webpart类,赶紧修改,测试,通过。
后记,这个bug已经被修复,补丁包下载地址 http://support.microsoft.com/kb/948947