You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Shawn Du <sh...@neulion.com.cn> on 2017/01/03 07:56:04 UTC

class org.apache.ignite.binary.BinaryObjectException: Wrong value has been set

Hi,

 

I met very strange issues.  With the same code, on one machine, it works
fine, but on another cluster, it always failed with exception:

 

java.lang.RuntimeException: class
org.apache.ignite.binary.BinaryObjectException: Wrong value has been set
[typeName=streams, fieldName=product, fieldType=Object,
assignedValueType=String] at

I met this issue before, I remembered that I fixed it by renaming a class
field.  But this time, I can't, for we create it dynamically with binary
object.

 

Please help.

 

Thanks

Shawn

 

 

 


Re: 答复: class org.apache.ignite.binary.BinaryObjectException: Wrong value has been set

Posted by dkarachentsev <dk...@gridgain.com>.
You may use BinaryObjectBuilder#setField(String, T, Class<? super T>) to
explicitly set argument type.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/class-org-apache-ignite-binary-BinaryObjectException-Wrong-value-has-been-set-tp9829p9832.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

答复: class org.apache.ignite.binary.BinaryObjectException: Wrong value has been set

Posted by Shawn Du <sh...@neulion.com.cn>.
Exactly!

 

Thanks.

Shawn

 

发件人: Nikolai Tikhonov [mailto:ntikhonov@apache.org] 
发送时间: 2017年1月3日 16:05
收件人: user@ignite.apache.org
主题: Re: class org.apache.ignite.binary.BinaryObjectException: Wrong value has been set

 

Hi,

 

Is it possible that you build your object by binary builder and set null value for "product" field? In this case will be created metadata where type of field will be assigned Object and when we will create new object with non-null value (for example String) you got this exception.

 

Thanks,

Nikolay 

 

On Tue, Jan 3, 2017 at 10:56 AM, Shawn Du <shawn.du@neulion.com.cn <ma...@neulion.com.cn> > wrote:

Hi,

 

I met very strange issues.  With the same code, on one machine, it works fine, but on another cluster, it always failed with exception:

 

java.lang.RuntimeException: class org.apache.ignite.binary.BinaryObjectException: Wrong value has been set [typeName=streams, fieldName=product, fieldType=Object, assignedValueType=String] at

I met this issue before, I remembered that I fixed it by renaming a class field.  But this time, I can’t, for we create it dynamically with binary object.

 

Please help.

 

Thanks

Shawn

 

 

 

 


Re: class org.apache.ignite.binary.BinaryObjectException: Wrong value has been set

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hi,

Is it possible that you build your object by binary builder and set null
value for "product" field? In this case will be created metadata where type
of field will be assigned Object and when we will create new object with
non-null value (for example String) you got this exception.

Thanks,
Nikolay

On Tue, Jan 3, 2017 at 10:56 AM, Shawn Du <sh...@neulion.com.cn> wrote:

> Hi,
>
>
>
> I met very strange issues.  With the same code, on one machine, it works
> fine, but on another cluster, it always failed with exception:
>
>
>
> java.lang.RuntimeException: class org.apache.ignite.binary.BinaryObjectException:
> Wrong value has been set [typeName=streams, fieldName=product,
> fieldType=Object, assignedValueType=String] at
>
> I met this issue before, I remembered that I fixed it by renaming a class
> field.  But this time, I can’t, for we create it dynamically with binary
> object.
>
>
>
> Please help.
>
>
>
> Thanks
>
> Shawn
>
>
>
>
>
>
>