J
John A
When we remote calls to a component that throws a
System.Data.OracleClient.OracleException, we see a SerializationException
when the original OracleException is being deserialized on the client.
This is the error text:
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.Runtime.Serialization.SerializationException: Member message was not
found.
at System.Runtime.Serialization.SerializationInfo.GetElement(String name,
Type& foundType)
at System.Runtime.Serialization.SerializationInfo.GetValue(String name,
Type type)
at System.Data.OracleClient.OracleException..ctor(SerializationInfo si,
StreamingContext sc)
We have narrowed it down to the constructor
OracleException(System.Runtime.Serialization.SerializationInfo
si,System.Runtime.Serialization.StreamingContext sc), which looks for
members "message" and "source", but the GetObjectData(...) method in the
base (System.Exception) uses the strings "Member" and "Source". Since the
element lookup in SerializationInfo is case sensistive, GetElement() and
FindElement() fail and the OracleException deserialize throws an exception.
Does anyone know of a fix or workaround (other than having to extract the
exception string before it gets serialized)?
John Aranha
System.Data.OracleClient.OracleException, we see a SerializationException
when the original OracleException is being deserialized on the client.
This is the error text:
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.Runtime.Serialization.SerializationException: Member message was not
found.
at System.Runtime.Serialization.SerializationInfo.GetElement(String name,
Type& foundType)
at System.Runtime.Serialization.SerializationInfo.GetValue(String name,
Type type)
at System.Data.OracleClient.OracleException..ctor(SerializationInfo si,
StreamingContext sc)
We have narrowed it down to the constructor
OracleException(System.Runtime.Serialization.SerializationInfo
si,System.Runtime.Serialization.StreamingContext sc), which looks for
members "message" and "source", but the GetObjectData(...) method in the
base (System.Exception) uses the strings "Member" and "Source". Since the
element lookup in SerializationInfo is case sensistive, GetElement() and
FindElement() fail and the OracleException deserialize throws an exception.
Does anyone know of a fix or workaround (other than having to extract the
exception string before it gets serialized)?
John Aranha