tags:

views:

558

answers:

4

Really wish i was God, then I would understand what this means:

The element 'MyList' of type 'ListInstance' for feature 'MyLists' (id: f3981600- c824-4f88-85ce-94d049ba63ee) threw an exception during activation: Cannot complete this action. Please try again.

Anyone know what this error "really means". Its happening when i try activate the feature.

The feature on activated code is pretty straight forward:

    public override void FeatureActivated(SPFeatureReceiverProperties properties)
    {
        using (SPWeb site = properties.Feature.Parent as SPWeb)
        {
            SPList list = site.Lists["My Messages"];
            list.ContentTypesEnabled = true;
            list.Update(); 
        }
    }
+1  A: 

Hi there.

To start with the basics - have you had a look at the SharePoint log file to see if there is any more information available about the error? The log file can usually be found in the 12 hive folder under Logs

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS

In the latest log file, have a search for the feature that you're trying to activate (try using the feature's name. If that fails try the GUID).

Sometimes the log file has some more detail on the error, or you might see an entry in the log next to the error that might help you figure out what went wrong.

Another place you could look is the Windows event log - open that up and have a look at the Applications node. You might see SharePoint related error messages logged which may have details about the failure.

Cheers. Jas.

Jason Evans
That error is from the extended log :(, thats the full error message. Helpful I know - but I would expect such an error from MOSS, if it were helpful, we wouldn't be programming in SharePoint.
JL
A: 

There should be an error code in the exception as well. It usually is related to some COM error. try googling for SharePoint + that specific error code.

Colin
+1  A: 

There was an error somewhere in either the list instance, list definition, list schema or the feature receiver, unfortunately with MOSS - you don't always get real error messages or an easy way to debug... So I ended up starting over... completely and building in functionality 1 line at a time....

JL
A: 

Hello

if you are using that fancy visual studio deploy you may end up having this error well what is hapenning is that there are two or more features trying to do the same thing have look at you wsp view :

Solution : remove de duplicate the features 1) clean your pkg and bin folders 2) unistall any duplicate feature or list (you can see the lists in sharepoint designer)

Cheers

Mohamed Hachem