Ice.UnexpectedObjectException from library, ConsoleApp runs same library with no error
I am getting the following ICE exception when trying to run a library which uses ICE to communicate with multiple ICE servers. I am packaging this library into an Excel plug in using ExcelDNA. The strange thing is that when call the library from a console application, I do not get the exception. The exception is only thrown when i run the excel plugin.
- The servers and the client use the same .ice files and Ice.dll. They were also sliced with the same version of slice2cs.exe.
- All of the servers are communicating successfully with the client except one - ReferenceDataLite
- The error i pasted below is for one object - zcClassification, however all of objects from ReferenceDataLite throw the same error
The servers are running as x64 but the library is built as x86 because it needs to run in Excel 32bit. (Having said this, I did build the library as x64 and ran it in Excel x64 and got the same error) ALSO, my console app runs fine whether I run it as x64 or x86.
I have been trying to get this working for 8 days, any help would be greatly appreciated!
Here is the error:
reason = "expected element of type ::Mag::ReferenceDataLite::ZeroC::zcClassification' but received ::Mag::ReferenceDataLite::ZeroC::zcClassification"
type = "::Mag::ReferenceDataLite::ZeroC::zcClassification"
expectedType = "::Mag::ReferenceDataLite::ZeroC::zcClassification"
at IceInternal.Ex.throwUOE(String expectedType, String actualType)
at IceInternal.ArrayPatcher 1.patch(Object v)
at IceInternal.BasicStream.EncapsDecoder.unmarshal(Int32 index, Object v)
The exception is being thrown on the client on the readPendingObjects() row of generated code:
public Mag.ReferenceDataLite.ZeroC.zcClassification end_getClassifications(Ice.AsyncResult r__)
IceInternal.OutgoingAsync outAsync__ = IceInternal.OutgoingAsync.check(r__, this, getClassifications_name);
throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
IceInternal.BasicStream is__ = outAsync__.startReadParams();
ret__ = Mag.ReferenceDataLite.ZeroC.zcClassificationsHelper.read(is__);
is__.readPendingObjects();//EXCEPTION IS THROW HERE