locked
Error publishing any customization RRS feed

  • Question

  • Hi all,

    Today I install the rollup 6 on the CRM of my production environment, but first I install the rollup on a dev environment and made some tests.

    Everything look fine for me so then I installed on the prod environment, now I made some changes on a custom entity and try to publish but I’m getting the generic error "An error has occurred" .

    I tried publishing any other system entity and get the same error.

    Nothing is registered on the event viewer so I enabled the trace.


    This is what i get:

    [2009-09-09 18:36:13.0] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   13 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Info | CrmDbConnection.InternalExecuteReader
     at CrmDbConnection.InternalExecuteReader(IDbCommand command)
     at CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate)
     at CrmDbConnection.ExecuteReader(IDbCommand command)
     at MetadataProcessObject.ExecuteQuery(IDbCommand command)
     at MetadataProcessObject.RetrieveMultipleAsIfPublished(SimpleQueryExpression queryExpression, ISqlExecutionContext sqlContext)
     at <>c__DisplayClass4.<RetrieveMultiple>b__3(SqlExecutionContext context)
     at OnDemandMetadataDataProviderBase.ExecuteInNewSqlContext(ExecuteInNewSqlContextHandler handler)
     at OnDemandMetadataDataProviderBase.RetrieveMultiple(SimpleQueryExpression queryExpression)
     at OnDemandMetadataDataProviderBase.LoadLabels(Guid objectId, String objectColumnName, String collectionName, String labelName)
     at OnDemandEntityMetadataDataProvider.get_Description()
     at EntityMetadata.get_Description()
     at EntityGridDataProvider.GetData(IUser user, String[]& columnSet, Row[]& dataSet)
     at SysCustGridDataProvider.Execute()
     at AppGridUIProvider.Render(HtmlTextWriter output)
     at AppGridWebService.GetRefreshResponseHtml(IGridUIProvider uiProvider)
     at AppGridWebService.GetRefreshResponseXml(IGridDataProvider dataProvider, IGridUIProvider uiProvider)
     at AppGridWebService.Refresh(String gridXml)
     at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
     at RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at LogicalMethodInfo.Invoke(Object target, Object[] values)
     at WebServiceHandler.Invoke()
     at WebServiceHandler.CoreProcessRequest()
     at SyncSessionlessHandler.ProcessRequest(HttpContext context)
     at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     at ApplicationStepManager.ResumeSteps(Exception error)
     at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
     at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
     at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    >SELECT T1.LocalizedLabelId AS localizedlabelid,
     T1.LanguageId AS languageid,
     T1.ObjectId AS objectid,
     T1.ObjectColumnName AS objectcolumnname,
     T1.Label AS label FROM LocalizedLabelLogicalView T1
        LEFT OUTER JOIN LocalizedLabelLogicalView T2 ON
        (T1.LocalizedLabelId = T2.LocalizedLabelId AND T1.LocalizedLabelRowId <> T2.LocalizedLabelRowId and T1.InProduction = 1)
        where T2.InProduction is null AND T1.ObjectId = '42dd5681-6a4a-47f2-8169-5efede47689e' AND T1.ObjectColumnName = 'Description' AND T1.CustomizationLevel <> Delete


    Can anyone help please?

     This is very important.




    Jessica
    Wednesday, September 9, 2009 5:43 PM

Answers


  • Thanks for all the help but i figured out.

    Here is the solution

    I don´t know how but maybe the installation changed the owner of the stored procedures.


    Jessica
    • Marked as answer by Jim Glass Jr Tuesday, September 22, 2009 3:14 PM
    Wednesday, September 9, 2009 7:51 PM

All replies

  • Hi Jessica,

    sorry but your trace file snippet does not contain any useful error information. There should be at least one entry with Level: Error
    Wednesday, September 9, 2009 6:33 PM
  • Yes, you're right.

    Here is the trace error:

    [2009-09-09 20:21:16.7] Process: w3wp |Organization:eb4ef3cd-e917-4329-a0c5-3c1607ebad5b |Thread:   30 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Info | AppWebService.CreateSoapException
     at AppWebService.CreateSoapException(Exception innerException)
     at SystemCustomization.PublishCustomizations(XmlNode data)
     at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
     at RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at LogicalMethodInfo.Invoke(Object target, Object[] values)
     at WebServiceHandler.Invoke()
     at WebServiceHandler.CoreProcessRequest()
     at SyncSessionlessHandler.ProcessRequest(HttpContext context)
     at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     at ApplicationStepManager.ResumeSteps(Exception error)
     at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
     at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
     at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    >Exception in Application WebServices.  See the following trace error for more information.
    [2009-09-09 20:21:16.7] Process: w3wp |Organization:eb4ef3cd-e917-4329-a0c5-3c1607ebad5b |Thread:   30 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ErrorInformation.LogError
     at ErrorInformation.LogError()
     at ErrorInformation..ctor(Exception exception, Uri requestUrl, Boolean logError)
     at ErrorInformation..ctor(Exception exception, Uri requestUrl)
     at AppWebService.CreateSoapException(Exception innerException)
     at SystemCustomization.PublishCustomizations(XmlNode data)
     at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
     at RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at LogicalMethodInfo.Invoke(Object target, Object[] values)
     at WebServiceHandler.Invoke()
     at WebServiceHandler.CoreProcessRequest()
     at SyncSessionlessHandler.ProcessRequest(HttpContext context)
     at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     at ApplicationStepManager.ResumeSteps(Exception error)
     at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
     at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
     at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    >MSCRM Error Report:
    --------------------------------------------------------------------------------------------------------
    Error: Exception has been thrown by the target of an invocation.

    Error Message: Exception has been thrown by the target of an invocation.

    Source File: Not available

    Line Number: Not available

    Request URL: http://crm:5555/Organization/AppWebServices/SystemCustomization.asmx

    Stack Trace Info: [SqlException: Could not find stored procedure 'p_PublishMetadata'.]
       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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
       at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ExecuteNonQuery(IDbCommand command)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.PublishMultiple(MetadataBusinessEntityMoniker[] monikers, ISqlExecutionContext sqlContext, Boolean publishDeep)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.PublishMultiple(MetadataBusinessEntityMoniker[] monikers, ISqlExecutionContext sqlContext)
       at Microsoft.Crm.Tools.ImportExportPublish.EntityMetadataPublisher.Publish(Hashtable entities)
       at Microsoft.Crm.Tools.ImportExportPublish.PublishXml.Publish(String entitiesString, Boolean flushCache, ExecutionContext context)
       at Microsoft.Crm.Tools.ImportExportPublish.PublishXml.Publish(String entitiesString, ExecutionContext context)
       at Microsoft.Crm.WebServices.PublishXmlService.Publish(String entities, ExecutionContext context)

    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
       at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context)
       at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
       at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
       at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
       at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
       at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
       at Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
       at Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
       at Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
       at Microsoft.Crm.Sdk.InProcessCrmService.Execute(Object request)
       at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
       at Microsoft.Crm.Application.Platform.DataSource.PublishXml(String parameterXml)
       at Microsoft.Crm.Application.WebServices.SystemCustomization.CustomizationsPublish.Execute(IUser user, XmlNode data)
       at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.PublishCustomizations(XmlNode data)



    When i call the URL from the IE http://crm:5555/Organization/AppWebServices/SystemCustomization.asmx i got this:

    System.Web.Services.Protocols.SoapException: Microsoft.Crm.CrmException: INVALID_WRPC_TOKEN: Validate WRPC Token: WRPCTokenState=Invalid, TOKEN_EXPIRY=4320, IGNORE_TOKEN=False, TOKEN_KEY=K06liImzEd685QAVXQCAKuTBFhrj+NIuKQDFhVcp8FYI3qCtEY2XofErjTZXk6AX
       at Microsoft.Crm.Application.Security.WRPCContext.ValidateTokenState()
       at Microsoft.Crm.Application.Platform.CommunicationListeners.CommunicationListener.HandlePreEvent(PlatformCommand command)
       at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
       at Microsoft.Crm.Application.Platform.DataSource.PublishAllXml()
       at Microsoft.Crm.Application.WebServices.SystemCustomization.CustomizationsPublishAll.Execute(IUser user)
       at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.PublishAllCustomizations() ---> Microsoft.Crm.CrmException: INVALID_WRPC_TOKEN: Validate WRPC Token: WRPCTokenState=Invalid, TOKEN_EXPIRY=4320, IGNORE_TOKEN=False, TOKEN_KEY=K06liImzEd685QAVXQCAKuTBFhrj+NIuKQDFhVcp8FYI3qCtEY2XofErjTZXk6AX
       at Microsoft.Crm.Application.Security.WRPCContext.ValidateTokenState()
       at Microsoft.Crm.Application.Platform.CommunicationListeners.CommunicationListener.HandlePreEvent(PlatformCommand command)
       at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
       at Microsoft.Crm.Application.Platform.DataSource.PublishAllXml()
       at Microsoft.Crm.Application.WebServices.SystemCustomization.CustomizationsPublishAll.Execute(IUser user)
       at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.PublishAllCustomizations()
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.PublishAllCustomizations()
    


     


    Jessica
    Wednesday, September 9, 2009 7:37 PM

  • Thanks for all the help but i figured out.

    Here is the solution

    I don´t know how but maybe the installation changed the owner of the stored procedures.


    Jessica
    • Marked as answer by Jim Glass Jr Tuesday, September 22, 2009 3:14 PM
    Wednesday, September 9, 2009 7:51 PM
  • Hi Jessica,

    could you please provide your solution (the posted link points to this thread)?
    Wednesday, September 9, 2009 8:19 PM
  • Dear Ckeller

               i am getting the same error. Have you found the solution for the above SOAP exception..The solution link that is mentioned by jessica, that is directed to this page only.

    error:

        System.Web.Services.Protocols.SoapException: Microsoft.Crm.CrmException: INVALID_WRPC_TOKEN: Validate WRPC Token: WRPCTokenState

    please hel me, if you have any suggestions..Thank you in advance..


    Regards

    Arun
    Tuesday, October 27, 2009 7:00 AM