Error when publishing an operation

Jun 17, 2009 at 7:14 PM

 

Hi,

I'm having the following issue:

When trying to publish an operation the Model Viewer doesn't show any kind of error, but the operation doesn't get listed in the published operations section.

The event viewer shows the following exception:

 

An application error occurred in Catalog Service Operation [GetRuntimeServerByName]. Error Detail [Exception Information Type[ApplicationException] Source[Microsoft.MSE.Catalog.Module] Message[Failed to extrat relevant schema types due to error [Exception Information Type[InvalidOperationException] Source[mscorlib] Message[Collection was modified; enumeration operation may not execute.] StackTrace[   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext()
   at Microsoft.MSE.Catalog.Module.Business.SchemaManager.ExtractRelevantSchemaTypes(List`1 operationVersions, Boolean optimizeWsdl, SqlTransaction txn, SqlConnection conn)]]] StackTrace[   at Microsoft.MSE.Catalog.Module.Business.SchemaManager.ExtractRelevantSchemaTypes(List`1 operationVersions, Boolean optimizeWsdl, SqlTransaction txn, SqlConnection conn)
   at Microsoft.MSE.Catalog.Module.Business.EndpointManager.CreateWSDLFromEndpointMetadata(Endpoint endpoint, SqlTransaction txn, SqlConnection conn)
   at Microsoft.MSE.Catalog.Module.Business.EndpointManager.GetEndpoint(Guid ID, Guid RuntimeServerID, String hostName, Boolean provideWSDL, SqlTransaction txn, SqlConnection conn)
   at Microsoft.MSE.Catalog.Module.Business.RuntimeServerManager.GetRuntimeServer(Guid runtimeServerID, Boolean provideWSDL, SqlTransaction txn, SqlConnection conn)
   at Microsoft.MSE.Catalog.Module.Services.ServiceModel.GetRuntimeServerByName(GetRuntimeServerByNameRequest request)]Exception Information Type[InvalidOperationException] Source[mscorlib] Message[Collection was modified; enumeration operation may not execute.] StackTrace[   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext()
   at Microsoft.MSE.Catalog.Module.Business.SchemaManager.ExtractRelevantSchemaTypes(List`1 operationVersions, Boolean optimizeWsdl, SqlTransaction txn, SqlConnection conn)]]

Does anyone have a clue about this?

Tell me if you need any additional information...

 

Thank you,

CS.

 

Developer
Jun 19, 2009 at 4:36 PM

The only time I've seen an error around "collection has been modified" was in the Model Viewer event log.  We caught a few of those before the May release but they didn't interfere with normal functions. 

Which event log did you see this error in?  If it wasn't in the Model Viewer log then you seem to have found a new issue.  If it was in the Model Viewer log, simply resetting the catalog connection from the menu (or restarting the ModelViewer) should make it go away.

One comment about publishing an operation version at an endpoint... you must select both active and published since only active operations can be published.

Jun 19, 2009 at 5:09 PM

Thaks for your reply.

The error is reported on both the Service Catalog and the Model Viewer log.

Resetting the connection and restarting the Model Viewer doesn't fix it.

I noticed that if I select both "active" and "publish" the operation doesn't get published nor active, but if I select only "active" the operation gets listed in the "associated operations" section...

 

Developer
Jun 19, 2009 at 5:49 PM

After a look at the catalog service, this looks like it might be a bug.  I'm betting in your endpoint definition does not have the "Optimize Wsdl" feature checked.  If this is the case, please try checking this option and let us know the result.  I suspect everything will work when you enable wsdl optimization.

 

Jun 19, 2009 at 6:26 PM

You're right, I didn't have "Optimize WSDL" enabled.

After enabling wsdl optimization the operation was successfully published, as expected.

Thanks for your help.

Developer
Jun 19, 2009 at 6:48 PM

Thanks for verifying.  I've logged this as an issue [workitem:7908].