Error loading service

I get the following error while loading a service. Everything seems to work correctly anyway, but I'd like to get rid of the error. Any suggestions on what might be causing this?

*** System.TypeInitializationException: The type initializer for 'Dss.Transforms.TransformFuturaPendulumPrioperceptiveEntity.Transforms' threw an exception. > System.TypeLoadException: Could not load type 'Oursland.Robotics.Services.FuturaPendulum.PrioperceptiveEntity.Proxy.FuturaPendulumPrioperceptiveEntityState' from assembly 'FuturaPendulumPrioperceptiveEntity.Y2007.M08.Proxy, Version=0.0.0.0, Culture=neutral, PublicKeyToken=95cf150ab757a788'.
at Dss.Transforms.TransformFuturaPendulumPrioperceptiveEntity.Transforms..cctor()
End of inner exception stack trace
at System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(IntPtr type)
at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Dss.Services.Serializer.DataCache.LoadServiceTransform(AssemblyLocations locations)
at Microsoft.Dss.Services.ContractDirectory.ContractDirectory.FinishUp(QueryServiceContract query, ContractResults results, Port`1 directoryResultsPort)

[1459 byte] By [AlanOursland] at [2008-1-8]
# 1

This eventually went away.

Now I am getting a different error that is preventing one of my services from loading:

** Error creating service.Fault SubcodeBig SmileuplicateEntry. Service type:http://schemas.oursland.net/2007/08/futuraserialport.html [08/19/2007 23:13:49][http://ot1:50000/constructor/ea71318b-d81a-4611-bff0-508d9f29b97b]

Any ideas on what I need to fix for this error?

AlanOursland at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Decentralized Software Services (DSS)...
# 2

It looks like the DuplicateError started when I added a second operation derived from Update. That meant I had two handlers that could take an Update operation. I am guessing that confused the dsshost. Is this expected?

I tried changing my handler to derive directly from DssOperation, but the constructor I added that takes the Request data was not added to the proxy.

What do I need to do to make a custom operation constructor carry over to the proxy version?

AlanOursland at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Decentralized Software Services (DSS)...
# 3
this is just warning. It means a service is already started, so we dont need to create another to partner with your service.
GeorgeChrysanthakopoulos at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Decentralized Software Services (DSS)...
# 4

I don't think that is what is going on with the DuplicateEntry error. If I look at my service list, I do not see my FuturaSerialPort running. Also, the service that depends on FuturaSerialPort does not start because it cannot find the required FuturaSerialPort partner service.

Code Snippet

[ServicePort()]
public class FuturaSerialPortOperations : PortSet<
DsspDefaultLookup,
DsspDefaultDrop,
Get,
Replace,
Subscribe,
ReadPort,
SetEffector>

{}

public class ReadPort : Update<ReadPortRequest, PortSet<DefaultUpdateResponseType, Fault>> {
public ReadPort() : base(new ReadPortRequest()) {}
}

public class SetEffector : Update<ReadPortRequest, PortSet<DefaultUpdateResponseType, Fault>> {
public SetEffector(SetEffectorRequest body) : base(body) { }
}

If I remove the SetEffector operation then the DuplicateEntry error disappears. My theory is that there are two Handler functions that take Update operations and so the DssHost does not know which it should Handler should be called in response to an Update request. The DssHost throws a DuplicateEntry error because there are two Handler entries for Update.

I tried changing SetEffector to derive directly from DssOperation like this:

Code Snippet

public class SetEffector : DsspOperation<SetEffectorRequest, PortSet<DefaultUpdateResponseType, Fault>> {
public SetEffector(SetEffectorRequest body) : base("SetEffector", body) { }
}

But the proxy generated for SetEffector does not have the single argument constructor I defined.

I suspect there is an attribute that will tell the proxy generator to include that constructor, but I cannot find any examples to copy.

AlanOursland at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Decentralized Software Services (DSS)...
# 5

Looking at the examples I see plenty of examples where multiple operations derived from Update are defined. So much for that theory.

AlanOursland at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Decentralized Software Services (DSS)...
# 6

You have two operations, SetEffector, and ReadPort that have the same body type (ReadPortRequest) and *both* derive from Update. That is not allowed. Instead define a new body type, like SetEffectorRequest, that can for example inehrit from some common base type.

thanx

g

GeorgeChrysanthakopoulos at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Decentralized Software Services (DSS)...
# 7
Thank you again, George.

I had the types set correctly in my code, but messed them up when I copied and edited them from the DssOperation declartion I had.

I think I found the solution. If I add a default constructor to SetEffector then the service loads correctly.

AlanOursland at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Decentralized Software Services (DSS)...

Microsoft Robotics Studio

Site Classified