Filters/Extractors Are Not Deserializable In .Net. (Doc ID 802099.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle Coherence - Version: 3.3.1 to 3.4.2
This problem can occur on any platform.

Symptoms

Putting an object of the C# class Tangosol.Util.Filter.AndFilter works successfully.

cache[KEY] = filter;

But retrieving it again on the C# side fails because this C# class does not have a default constructor.

IFilter fromCache = (IFilter) cache[KEY];


This will run into the following exception:

Unhandled Exception: System.IO.IOException: An exception occurred instantiating
an IPortableObject user type from a POF stream: type-id=68, class-name=Tangosol.
Util.Filter.EqualsFilter, exception=
System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean
noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks,
Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at Tangosol.IO.Pof.PortableObjectSerializer.Deserialize(IPofReader reader) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\IO\Pof\PortableObjectSerializer.cs:line 175
at Tangosol.IO.Pof.PortableObjectSerializer.Deserialize(IPofReader reader) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\IO\Pof\PortableObjectSerializer.cs:line 188
at Tangosol.IO.Pof.PofStreamReader.ReadAsObject(Int32 typeId) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\IO\Pof\PofStreamReader.cs:line 3781
at Tangosol.IO.Pof.PofStreamReader.ReadObject(Int32 index) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\IO\Pof\PofStreamReader.cs:line 2409
at Tangosol.IO.Pof.ConfigurablePofContext.Deserialize(DataReader reader) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\IO\Pof\ConfigurablePofContext.cs:line 435
at Tangosol.Net.Impl.RemoteNamedCache.ConverterFromBinary.Convert(Object o) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Impl\RemoteNamedCache.cs:line 1448
at Tangosol.Util.ConverterCollections.ConverterDictionary.get_Item(Object key) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\Util\ConverterCollections.cs:line 1238
at Tangosol.Net.Impl.RemoteNamedCache.get_Item(Object key) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Impl\RemoteNamedCache.cs:line 185
at Tangosol.Net.Impl.SafeNamedCache.get_Item(Object key) in
c:\dev\release.net\coherence-net-v3.4\src\Coherence\Net\Impl\SafeNamedCache.cs:line 232
at CoherenceNetTest.Program.Main(String[] args) in
C:\data\junk\7353442.993\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1\Program.cs:line
19

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms