2

I developed two features, one should deploy a workflow. After hitting F5 in Visual Studio 2012, I get a NullReference-Exception. Here is the output shown:

------ Deploy started: Project: Customer_Solution2, Configuration: Debug Any CPU ------
Active Deployment Configuration: Default
  Skipping deployment step because a pre-deployment command is not specified.
  Recycle IIS Application Pool:
  Recycling IIS application pool 'SharePoint - weisungen.Customer.local80'...
  Retract Solution:
  Deactivating feature 'Customer_Solution2_Customer_Weisung_Templates_Feature' ...
  Retracting solution 'Customer_Solution2.wsp'...
  Deleting solution 'Customer_Solution2.wsp'...
  Add Solution:
  Found 7 deployment conflict(s).  Resolving conflicts ...
  Deleted list instance 'Lists/DraftWeisungen' from server.
  Deleted list instance 'Lists/Segmente' from server.
  Deleted list instance 'Lists/PublishedWeisungen' from server.
  Deleted list instance 'Lists/WeisungAttachments' from server.
  Could not delete file 'http://server02/wfsvc/153a1b69cff54671b12cd0d7d90498dc/Workflow.xaml' from server.
  Deleted file 'http://server02/wfsvc/153a1b69cff54671b12cd0d7d90498dc/WorkflowStartAssociation' from server.
  Deleted list instance 'Lists/WorkflowHistoryList' from server.
  Deleted list instance 'Lists/WorkflowTaskList' from server.
  Deployment conflict resolution for one or more items failed. See the Output Window for details.
  Adding solution 'Customer_Solution2.wsp'...
  Deploying solution 'Customer_Solution2.wsp'...
  Activate Features:
  Activating feature 'Customer_Weisung_Templates_Feature' ...
  Activating feature 'Customer_Weisung_Workflow_Feature' ...
Error occurred in deployment step 'Activate Features': System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.SharePoint.WorkflowServices.WorkflowSubscriptionStorageEventReceiver.ItemUpdating(SPItemEventProperties properties)
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I installed the WorkflowManager and configured it to run properly (I hope so!). Any Ideas?

Here you find the message in the Logfile after trying to activate the workflow feature on SharePoint:

Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: System.NullReferenceException: Object reference not set to an instance of an object.   
 at Microsoft.SharePoint.WorkflowServices.WorkflowDefinitionStorageEventReceiver.PublishDefinition(SPItemEventProperties properties)    
 at Microsoft.SharePoint.WorkflowServices.SPWorkflowPackageFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties)    
 at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)    
 at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce)    
 at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)    
 at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, Int32 compatibilityLevel, String featureName, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope)    
 at Microsoft.SharePoint.WebControls.FeatureActivator.ActivateFeature(Guid featid, Int32 compatibilityLevel, SPFeatureDefinitionScope featdefScope)    
 at Microsoft.SharePoint.WebControls.FeatureActivatorItem.ToggleFeatureActivation()    
 at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
 at System.Web.UI.Page.HandleError(Exception e)    
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
 at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
 at System.Web.UI.Page.ProcessRequest()    
 at System.Web.UI.Page.ProcessRequest(HttpContext context)    
 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
 at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

1 Answer 1

4

Solution was:

Register-SPWorkflowService –SPSite "http://localhost/yourSite" –WorkflowHostUri "https://localhost:12290" –AllowOAuthHttp 

had to be executed!!

2
  • Worked... Awesome :-)!!
    – Muhammedh
    Aug 26, 2014 at 6:05
  • I am facing same issue, I have alos run Register-SPWorkflowService but still it showing same error while activating feature? Jul 11, 2015 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.