Problem with Activation / Deactivation

Jun 12, 2009 at 10:14 PM

One one site collection, i receive an error when clicking either Activate or Deactivate. Funny thing is, DB is created, tables are created, Synchronize works and yes, events fire correctly! On another site collection (same web application), no issues at all.

I just can't click Activate, Deactivate, or get this can't retract the solution...not even an stsadm -o deactivatefeature works.

For Activate/Deactivate buttons, the error is this:

Cannot complete this action.

Please try again.
   at Microsoft.SharePoint.SPContentType.PushDownChanges(CodeToPushDownChangesToDerivedCT derivedCTPushdownCode, CodeToPushDownChangesToListCTs listDerivedCTsPushdownCode, Boolean throwOnSealedOrReadOnly)
   at Microsoft.SharePoint.SPContentType.UpdateOnWeb(Boolean bPushdown, Boolean bThrowOnSealedOrReadOnly)
   at Microsoft.SharePoint.SPContentType.Update(Boolean updateChildren, Boolean throwOnSealedOrReadOnly)
   at AWS.SLAM.SharePoint.SharePointServices.DetachAllEventHandlers(String assemblyName, String listClassName, String contentTypeClassName)
   at AWS.SLAM.Activation.Activator.Deactivate()
   at AWS.SLAM.Administration.Activation.btnAttachEvents_Click(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


When trying to manually deactivate the feature with stsadm I get:

The type initializer for 'AWS.SLAM.ComponentService' threw an exception


Jun 12, 2009 at 11:17 PM

I know I love the "Please try again." SharePoint errors.  I am not sure what to try, but I did just upload a small update that should allow you to deactivate the feature via stsadm.   Please download the current SLAM Setup from Releases, after installing the SLAM Control Panel should say  On deactivate SLAM tries to detach event handlers, but if it runs into problems doing this it will still allow you to deactivate if no configs are available.  So basically, if you try to deactivate from the deactivate UI or SLAM UI you will receive errors if it fails but not if running stsadm.  Hopefully we can get more information about the "cannot complete this action" error though...




Jun 13, 2009 at 1:17 AM

ok, the new build allows for a site feature deactivation without failing.

I completely removed the solution, then installed the new build fresh. The activate/deactivate buttons still throw the error. When I click synchronize it creates the tables and fills data.

I tested record create, edit and delete and all sharepoint list modifications were forwarded to the SQL table. So if it's failing on some event creation, I have no idea what it is. Is there anything else to test?

I did have a bit of a scare before uninstalling this...the 3 lists I setup were throwing nasty errors on their AllItems.aspx pages "Index was outside the bounds of the array."..only the 3 that I setup for SLAM, so i was cursing you under my breath. However, once I uninstalled the feature I no longer got this error message. That may have been a red herring anyway, and just needed an app recycle to correct which automatically happens after the app removal.

OK, so then I reinstalled (noted above). Buttons fail, but my lists are intact.

I swear this thing was working for a good 10 minutes before going nuts. The only thing I did was add to the config to test on a second site collection. That worked, and works flawlessly. But since then, coming back to the first site collection throws errors.

FWIW, in the log, even when I click Activate the last item logged is "Deactivate Initiated."

Jun 15, 2009 at 5:01 PM

Activate does perform a Deactivate first to detach any existing event handlers then it does event handler attaching and table creation.  So that is why you should see a Deactivation message on Activate preceding the activation.