You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Josh Katz <Jo...@dodgeandcox.com> on 2021/05/20 22:47:03 UTC

System.InvalidOperationException: 'No coercion operator is defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and 'System.DateTime'

Using .NET UnitTest to connect to the cluster and persistence enabled.
Put works without errors. When calling Get we get the following exception:
System.InvalidOperationException: 'No coercion operator is defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and 'System.DateTime'

We are using System.Runtime.Serialization for the DateTime property with DataMemberAttribute.

Thanks,

Josh Katz
Dodge & Cox
555 California Street | 40th floor | San Francisco, CA 94104
415-262-7520

Josh.Katz.Contractor@dodgeandcox.com
www.dodgeandcox.com


----------------------------------------------------------------------
Please follow the hyperlink to important disclosures.https://www.dodgeandcox.com/disclosures/email_disclosure_funds.html


Re: System.InvalidOperationException: 'No coercion operator is defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and 'System.DateTime'

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Maybe you are doing something wrong which only becomes apparent in the
persistent setup.

Can you share a runnable reproducer project which exhibits the behavior?

Regards,
-- 
Ilya Kasnacheev


пт, 21 мая 2021 г. в 20:20, Josh Katz <Josh.Katz.Contractor@dodgeandcox.com
>:

> Hi Ilya,
>
>
>
> I’m getting this exception when calling ICache Get method to retrieve the
> object from the Cache. (The object has a DateTime property)
>
> I have no special configuration other than persistence enabled. In another
> project we didn’t use persistence and did not encounter this issue.
>
> Can you please clarify if this issue is only happening when using
> persistence? I’m going to try the IBinarizable approach from the docs.
>
>
>
> Thanks,
>
>
>
> Josh Katz
>
> Dodge & Cox | 415-262-7520
>
>
>
>
>
>
>
> *From:* Ilya Kasnacheev <il...@gmail.com>
> *Sent:* Friday, May 21, 2021 2:02 AM
> *To:* user@ignite.apache.org
> *Subject:* Re: System.InvalidOperationException: 'No coercion operator is
> defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder'
> and 'System.DateTime'
>
>
>
> *This is an EXTERNAL EMAIL. Stop and think before clicking a link or
> opening attachments.*
>
> Hello!
>
>
>
> For starters, it looks like you're putting a BinaryObjectBuilder into
> cache instead of BinaryObjectBilder.Build() return value.
>
>
>
> Regards,
>
> --
>
> Ilya Kasnacheev
>
>
>
>
>
> пт, 21 мая 2021 г. в 01:46, Josh Katz <
> Josh.Katz.Contractor@dodgeandcox.com>:
>
> Using .NET UnitTest to connect to the cluster and persistence enabled.
>
> Put works without errors. When calling Get we get the following exception:
>
> System.InvalidOperationException: 'No coercion operator is defined between
> types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and
> 'System.DateTime'
>
>
>
> We are using System.Runtime.Serialization for the DateTime property with
> DataMemberAttribute.
>
>
>
> Thanks,
>
>
>
> *Josh Katz*
>
> *Dodge & Cox*
>
> 555 California Street | 40th floor | San Francisco, CA 94104
>
> 415-262-7520
>
>
>
> Josh.Katz.Contractor@dodgeandcox.com
>
> www.dodgeandcox.com
>
>
>
>
> ------------------------------
>
> Please follow the hyperlink to important disclosures.
> https://www.dodgeandcox.com/disclosures/email_disclosure_funds.html
>
>

RE: System.InvalidOperationException: 'No coercion operator is defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and 'System.DateTime'

Posted by Josh Katz <Jo...@dodgeandcox.com>.
Hi Ilya,

I’m getting this exception when calling ICache Get method to retrieve the object from the Cache. (The object has a DateTime property)
I have no special configuration other than persistence enabled. In another project we didn’t use persistence and did not encounter this issue.
Can you please clarify if this issue is only happening when using persistence? I’m going to try the IBinarizable approach from the docs.

Thanks,

Josh Katz
Dodge & Cox | 415-262-7520



From: Ilya Kasnacheev <il...@gmail.com>
Sent: Friday, May 21, 2021 2:02 AM
To: user@ignite.apache.org
Subject: Re: System.InvalidOperationException: 'No coercion operator is defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and 'System.DateTime'

This is an EXTERNAL EMAIL. Stop and think before clicking a link or opening attachments.
Hello!

For starters, it looks like you're putting a BinaryObjectBuilder into cache instead of BinaryObjectBilder.Build() return value.

Regards,
--
Ilya Kasnacheev


пт, 21 мая 2021 г. в 01:46, Josh Katz <Jo...@dodgeandcox.com>>:
Using .NET UnitTest to connect to the cluster and persistence enabled.
Put works without errors. When calling Get we get the following exception:
System.InvalidOperationException: 'No coercion operator is defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and 'System.DateTime'

We are using System.Runtime.Serialization for the DateTime property with DataMemberAttribute.

Thanks,

Josh Katz
Dodge & Cox
555 California Street | 40th floor | San Francisco, CA 94104
415-262-7520

Josh.Katz.Contractor@dodgeandcox.com<ma...@dodgeandcox.com>
www.dodgeandcox.com<http://www.dodgeandcox.com>


________________________________
Please follow the hyperlink to important disclosures.
https://www.dodgeandcox.com/disclosures/email_disclosure_funds.html

Re: System.InvalidOperationException: 'No coercion operator is defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and 'System.DateTime'

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

For starters, it looks like you're putting a BinaryObjectBuilder into cache
instead of BinaryObjectBilder.Build() return value.

Regards,
-- 
Ilya Kasnacheev


пт, 21 мая 2021 г. в 01:46, Josh Katz <Josh.Katz.Contractor@dodgeandcox.com
>:

> Using .NET UnitTest to connect to the cluster and persistence enabled.
>
> Put works without errors. When calling Get we get the following exception:
>
> System.InvalidOperationException: 'No coercion operator is defined between
> types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and
> 'System.DateTime'
>
>
>
> We are using System.Runtime.Serialization for the DateTime property with
> DataMemberAttribute.
>
>
>
> Thanks,
>
>
>
> *Josh Katz*
>
> *Dodge & Cox*
>
> 555 California Street | 40th floor | San Francisco, CA 94104
>
> 415-262-7520
>
>
>
> Josh.Katz.Contractor@dodgeandcox.com
>
> www.dodgeandcox.com
>
>
>
>
> ------------------------------
> Please follow the hyperlink to important disclosures.
> https://www.dodgeandcox.com/disclosures/email_disclosure_funds.html
>
>

Re: System.InvalidOperationException: 'No coercion operator is defined between types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and 'System.DateTime'

Posted by Pavel Tupitsyn <pt...@apache.org>.
Josh, can you please provide the code?
Ideally, a simple reproducer I could run?

On Fri, May 21, 2021 at 1:47 AM Josh Katz <
Josh.Katz.Contractor@dodgeandcox.com> wrote:

> Using .NET UnitTest to connect to the cluster and persistence enabled.
>
> Put works without errors. When calling Get we get the following exception:
>
> System.InvalidOperationException: 'No coercion operator is defined between
> types 'Apache.Ignite.Core.Impl.Binary.BinaryObjectBuilder' and
> 'System.DateTime'
>
>
>
> We are using System.Runtime.Serialization for the DateTime property with
> DataMemberAttribute.
>
>
>
> Thanks,
>
>
>
> *Josh Katz*
>
> *Dodge & Cox*
>
> 555 California Street | 40th floor | San Francisco, CA 94104
>
> 415-262-7520
>
>
>
> Josh.Katz.Contractor@dodgeandcox.com
>
> www.dodgeandcox.com
>
>
>
>
> ------------------------------
> Please follow the hyperlink to important disclosures.
> https://www.dodgeandcox.com/disclosures/email_disclosure_funds.html
>
>