You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ilya Kasnacheev <il...@gmail.com> on 2018/05/08 09:26:42 UTC

Re: BinaryObjectBuilder - setField - Boolean Type - Problem

Hello!

I assume this is because, previously, you managed to write a TEST where
F_BOOLEAN was Object. This is cached so it comes back to haunt you.

The solution here is to remove ignite/work/marshaller/ on all nodes (and
all data if it is persistent) and restart your cluster. Or change type TEST
to TEST2 :)

Regards,

-- 
Ilya Kasnacheev

2018-05-08 6:05 GMT+03:00 Jonathan mayer <jo...@yahoo.com>:

> Hi there, I am testing different Data Types and have come up against a
> problem with Boolean.
>
> I have created the following table from within DBeaver:-
>
> CREATE TABLE TEST (
>    F_ID varchar PRIMARY KEY,
>    F_INT INTEGER,
>    F_BOOLEAN BOOLEAN
> ) WITH "CACHE_NAME=TEST, key_type=java.lang.String, value_type=TEST";
>
>
> I am try to create Data via an IgniteDataStreamer.
>
> snippet:
>
> BinaryObjectBuilder binaryObjectBuilder = ignite.binary().builder("TEST");
>
> binaryObjectBuilder.setField("F_BOOLEAN", true);
> etc...
>
> BinaryObject bo = binaryObjectBuilder.build();
>
> String/Integer Types are working fine.
>
> Getting the error message :
>
> Wrong value has been set [typeName=TEST, fieldName=F_BOOLEAN,
> fieldType=Object, assignedValueType=boolean]
>
> Any help would be appreciated
>
> Jonathan
>

Re: BinaryObjectBuilder - setField - Boolean Type - Problem

Posted by Jonathan mayer <jo...@yahoo.com>.
 Hi Guys,
Thank you both very much for your help.
Yes, a complete reboot did the trick. I had thought that dropping the table would have worked but now know better.
I am just starting on my journey with Ignite so I imagine I will be on this list quite frequently.
Regards,
Jonathan


    On Tuesday, 8 May 2018, 19:26:47 GMT+10, Ilya Kasnacheev <il...@gmail.com> wrote:  
 
 Hello!

I assume this is because, previously, you managed to write a TEST where F_BOOLEAN was Object. This is cached so it comes back to haunt you.

The solution here is to remove ignite/work/marshaller/ on all nodes (and all data if it is persistent) and restart your cluster. Or change type TEST to TEST2 :)

Regards,

-- 
Ilya Kasnacheev

2018-05-08 6:05 GMT+03:00 Jonathan mayer <jo...@yahoo.com>:

Hi there, I am testing different Data Types and have come up against a problem with Boolean.
I have created the following table from within DBeaver:-
CREATE TABLE TEST (   F_ID varchar PRIMARY KEY,   F_INT INTEGER,   F_BOOLEAN BOOLEAN) WITH "CACHE_NAME=TEST, key_type=java.lang.String, value_type=TEST";

I am try to create Data via an IgniteDataStreamer.
snippet:
BinaryObjectBuilder binaryObjectBuilder = ignite.binary().builder("TEST" );

binaryObjectBuilder.setField(" F_BOOLEAN", true);
etc...
BinaryObject bo = binaryObjectBuilder.build();

String/Integer Types are working fine.
Getting the error message :
Wrong value has been set [typeName=TEST, fieldName=F_BOOLEAN, fieldType=Object, assignedValueType=boolean]

Any help would be appreciated
Jonathan