I have created a solution package for Sharepoint 2007 and have installed and deployed it on a development server. However, when I go to activate it through Site Features, I'm given a lovely page of an error stack:
Cannot insert the value NULL into column 'Assembly', table 'wss_content_rginfonet_bodsp2007app1.dbo.EventReceivers'; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column 'Assembly', table 'wss_content_rginfonet_bodsp2007app1.dbo.EventReceivers'; column does not allow nulls. INSERT fails.
The statement has been terminated.
The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionContentTypeAndEventReceiverBindings(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce)
at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)
at Microsoft.SharePoint.SPFeature.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)
at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)
at Microsoft.SharePoint.SPFeatureCollection.AddInternal(Guid featureId, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)
at Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId)
at Microsoft.SharePoint.WebControls.FeatureActivator.BtnActivateFeature_Click(Object objSender, EventArgs evtargs)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I'm not quite sure how to decipher this, but from my understanding it's saying that the application is attempting to insert a NULL event receiver into the event receivers table. Any help is greatly appreciated as usual!
Cheers~
Elements.xml (renamed to ListManifest.xml):
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="101">
<Receiver>
<Name>AddedEventHandler</Name>
<Type>ItemAdded</Type>
<SequenceNumber>10000</SequenceNumber>
<Class>ChangeContentTypeEventHandler.ChangeContentTypeEventHandler</Class>
<Data></Data>
<Filter></Filter>
</Receiver>
</Receivers>
</Elements>
manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/"
SolutionId="F9850E13-81B6-47E1-BBC6-42AC70A903C3" >
<FeatureManifests>
<FeatureManifest Location="List\Feature.xml"/>
</FeatureManifests>
<Assemblies>
<Assembly DeploymentTarget="GlobalAssemblyCache" Location="ChangeContentTypeEventHandler.dll"/>
</Assemblies>
</Solution>
deploy.ddf:
.OPTION Explicit ; Generate errors
.Set DiskDirectory1="..\bin"
.Set CabinetNameTemplate="ChangeContentTypeEventHandler.wsp"
manifest.xml
.Set DestinationDir="List\ListTemplates"
List\ListTemplates\ListManifest.xml ; specify cab file name
.Set DestinationDir="List\Messages"
List\Messages\schema.xml
.Set DestinationDir="List"
List\Feature.xml
.Set DestinationDir=.
..\bin\ChangeContentTypeEventHandler.dll ChangeContentTypeEventHandler.dll